{
  "spec": "rs-operations/1",
  "title": "Private agent operations",
  "console": "https://www.a2ally.com/operations",
  "api_root": "https://www.a2ally.com/v1/operations",
  "openapi": "https://www.a2ally.com/openapi.json",
  "authentication": {
    "account": "Use an active account key and current workspace membership. Budget, intent and OAuth grants do not authorize workspace operations.",
    "service": "Use a manager-issued rso_ credential only on its dedicated ingestion, reconciliation and explicitly permitted record endpoints. A credential is bound to one workspace and stream, checked against its issuer's current access, and cannot manage accounts, billing or membership.",
    "grant_changes": "Role or membership changes, workspace archival and stream archival permanently revoke affected credentials. Rejoining or restoring does not reactivate them.",
    "secrets": "Invitation and credential secrets are returned once. Neither client outboxes nor URLs should contain them."
  },
  "limits": {
    "batch_events": 100,
    "reconcile_keys": 100,
    "event_bytes": 32768,
    "batch_bytes": 1048576,
    "operations_http_json_bytes": 1048576,
    "case_verification_http_json_bytes": 4194304,
    "selected_case_events": 100,
    "owned_workspaces": 25,
    "workspace_members": 250,
    "streams_per_workspace": 100,
    "credential_expiry_days": 90
  },
  "guarantees": {
    "durability": "Acknowledged event keys remain reserved for the life of a stream; changed content under the same key is a conflict. Batch acknowledgements and event commitments commit together.",
    "reconciliation": "Supply expected_events with client_event_ids to compare exact normalized submitted content after an ambiguous delivery. A key-only lookup proves presence, not content equivalence.",
    "privacy": "Private workspace names, members, streams and event details remain private. Public event commitments use the coarse kind agent.operation; detailed action types remain inside their salted openings.",
    "evidence": "Signed exports establish submitted claims and signed inclusion when sealed. They do not prove execution, legal compliance, independent finality or independent anchoring of private case history.",
    "local_outbox": "Keep original evidence bytes and a durable local outbox. Retries submit receipts; they must not repeat the underlying business operation.",
    "notifications": "Exceptions, case decisions, statements and schedule failures go only to HTTPS alert endpoints the workspace's managers register: each delivery is signed (HMAC-SHA256 with the endpoint secret, plus the service's Web Bot Auth signature), retried with backoff up to six attempts, recorded per attempt, and can be redelivered. The same events can be pulled from the signal feed. Nothing is sent anywhere else."
  },
  "operations": [
    {
      "operation_id": "operations_alert_delivery_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "delivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,15}$"
              },
              "endpoint_id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "event_seq": {
                "type": "integer",
                "minimum": 1
              },
              "redelivery_of": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[1-9][0-9]{0,15}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requested_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "delivered",
                  "dead",
                  "abandoned"
                ]
              },
              "attempts": {
                "type": "integer",
                "minimum": 0
              },
              "max_attempts": {
                "const": 6
              },
              "next_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_latency_ms": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "delivered_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finished_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "endpoint_id",
              "event_seq",
              "redelivery_of",
              "requested_by",
              "status",
              "attempts",
              "max_attempts",
              "next_attempt_at",
              "last_status",
              "last_error",
              "last_latency_ms",
              "created_at",
              "delivered_at",
              "finished_at"
            ],
            "additionalProperties": false
          },
          "attempts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "attempt": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 6
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "http_status": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "latency_ms": {
                  "type": "integer",
                  "minimum": 0
                },
                "signatures": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 2
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "delivered",
                    "retry",
                    "dead",
                    "endpoint_disabled"
                  ]
                }
              },
              "required": [
                "attempt",
                "at",
                "http_status",
                "error",
                "latency_ms",
                "signatures",
                "outcome"
              ],
              "additionalProperties": false
            },
            "maxItems": 6
          },
          "redeliveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[1-9][0-9]{0,15}$"
                },
                "endpoint_id": {
                  "type": "string",
                  "pattern": "^opaep_[a-f0-9]{24}$"
                },
                "event_seq": {
                  "type": "integer",
                  "minimum": 1
                },
                "redelivery_of": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[1-9][0-9]{0,15}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "delivered",
                    "dead",
                    "abandoned"
                  ]
                },
                "attempts": {
                  "type": "integer",
                  "minimum": 0
                },
                "max_attempts": {
                  "const": 6
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_status": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_latency_ms": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivered_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "finished_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_seq",
                "redelivery_of",
                "requested_by",
                "status",
                "attempts",
                "max_attempts",
                "next_attempt_at",
                "last_status",
                "last_error",
                "last_latency_ms",
                "created_at",
                "delivered_at",
                "finished_at"
              ],
              "additionalProperties": false
            }
          },
          "event": {
            "type": "object",
            "properties": {
              "spec": {
                "const": "rs-operations-alert/1"
              },
              "id": {
                "type": "string",
                "pattern": "^opsig_[a-f0-9]{24}$"
              },
              "type": {
                "type": "string",
                "enum": [
                  "exception.opened",
                  "exception.updated",
                  "case.decided",
                  "statement.issued",
                  "schedule.failed",
                  "endpoint.ping"
                ]
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "severity": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "stream_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^opst_[a-f0-9]{24}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "subject_id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "data": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "details": {
                "type": "object",
                "properties": {},
                "additionalProperties": true
              },
              "links": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "minLength": 1
                  },
                  "console": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "api",
                  "console"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "spec",
              "id",
              "type",
              "workspace_id",
              "created_at",
              "severity",
              "stream_id",
              "subject_id",
              "data",
              "links"
            ],
            "additionalProperties": false
          },
          "body_format": {
            "type": "string",
            "enum": [
              "json",
              "slack"
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "delivery",
          "attempts",
          "redeliveries",
          "event",
          "body_format",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_alert_delivery_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "pattern": "^opaep_[a-f0-9]{24}$"
          },
          "deliveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[1-9][0-9]{0,15}$"
                },
                "endpoint_id": {
                  "type": "string",
                  "pattern": "^opaep_[a-f0-9]{24}$"
                },
                "event_seq": {
                  "type": "integer",
                  "minimum": 1
                },
                "redelivery_of": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[1-9][0-9]{0,15}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "requested_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "delivered",
                    "dead",
                    "abandoned"
                  ]
                },
                "attempts": {
                  "type": "integer",
                  "minimum": 0
                },
                "max_attempts": {
                  "const": 6
                },
                "next_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_status": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_latency_ms": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivered_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "finished_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "event_id": {
                  "type": "string",
                  "pattern": "^opsig_[a-f0-9]{24}$"
                },
                "event_type": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed",
                    "endpoint.ping"
                  ]
                },
                "event_created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "endpoint_id",
                "event_seq",
                "redelivery_of",
                "requested_by",
                "status",
                "attempts",
                "max_attempts",
                "next_attempt_at",
                "last_status",
                "last_error",
                "last_latency_ms",
                "created_at",
                "delivered_at",
                "finished_at",
                "event_id",
                "event_type",
                "event_created_at"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "next_before": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,15}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "health": {
            "type": "object",
            "properties": {
              "window_hours": {
                "const": 24
              },
              "attempts": {
                "type": "integer",
                "minimum": 0
              },
              "delivered": {
                "type": "integer",
                "minimum": 0
              },
              "failed": {
                "type": "integer",
                "minimum": 0
              },
              "success_rate": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latency_ms_p50": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latency_ms_p95": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pending_deliveries": {
                "type": "integer",
                "minimum": 0
              },
              "dead_letter_deliveries": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "window_hours",
              "attempts",
              "delivered",
              "failed",
              "success_rate",
              "latency_ms_p50",
              "latency_ms_p95",
              "pending_deliveries",
              "dead_letter_deliveries"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint_id",
          "deliveries",
          "next_before",
          "health",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_alert_delivery_redeliver",
      "response_schema": {
        "type": "object",
        "properties": {
          "delivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,15}$"
              },
              "endpoint_id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "event_seq": {
                "type": "integer",
                "minimum": 1
              },
              "redelivery_of": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[1-9][0-9]{0,15}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requested_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "delivered",
                  "dead",
                  "abandoned"
                ]
              },
              "attempts": {
                "type": "integer",
                "minimum": 0
              },
              "max_attempts": {
                "const": 6
              },
              "next_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_latency_ms": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "delivered_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finished_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "endpoint_id",
              "event_seq",
              "redelivery_of",
              "requested_by",
              "status",
              "attempts",
              "max_attempts",
              "next_attempt_at",
              "last_status",
              "last_error",
              "last_latency_ms",
              "created_at",
              "delivered_at",
              "finished_at"
            ],
            "additionalProperties": false
          },
          "redelivery_of": {
            "type": "string",
            "pattern": "^[1-9][0-9]{0,15}$"
          },
          "endpoint_status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "disabled",
              "deleted"
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "delivery",
          "redelivery_of",
          "endpoint_status",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "secret": {
            "type": "string",
            "pattern": "^opwhsec_[A-Za-z0-9_-]{43}$"
          },
          "signing": {
            "type": "object",
            "properties": {
              "header": {
                "type": "string",
                "minLength": 1
              },
              "timestamp_header": {
                "type": "string",
                "minLength": 1
              },
              "format": {
                "type": "string",
                "minLength": 1
              },
              "rotation": {
                "type": "string",
                "minLength": 1
              },
              "replay_window_seconds": {
                "const": 300
              },
              "platform_signature": {
                "type": "string",
                "minLength": 1
              },
              "dedupe": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "header",
              "timestamp_header",
              "format",
              "rotation",
              "replay_window_seconds",
              "platform_signature",
              "dedupe"
            ],
            "additionalProperties": false
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "secret",
          "signing",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "url": {
            "type": "string",
            "minLength": 9,
            "maxLength": 500
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "exception.opened",
                "exception.updated",
                "case.decided",
                "statement.issued",
                "schedule.failed"
              ]
            },
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true
          },
          "stream_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^opst_[a-f0-9]{24}$"
            },
            "maxItems": 50,
            "uniqueItems": true
          },
          "min_exception_severity": {
            "type": "string",
            "enum": [
              "debug",
              "info",
              "warning",
              "error",
              "critical"
            ],
            "default": "warning"
          },
          "include_details": {
            "type": "boolean",
            "default": false
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "slack"
            ],
            "default": "json"
          }
        },
        "required": [
          "label",
          "url"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_delete",
      "response_schema": {
        "type": "object",
        "properties": {
          "deleted": {
            "const": true
          },
          "endpoint_id": {
            "type": "string",
            "pattern": "^opaep_[a-f0-9]{24}$"
          },
          "abandoned_deliveries": {
            "type": "integer",
            "minimum": 0
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "deleted",
          "endpoint_id",
          "abandoned_deliveries",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "confirm": {
            "const": "delete"
          }
        },
        "required": [
          "confirm"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "signing": {
            "type": "object",
            "properties": {
              "header": {
                "type": "string",
                "minLength": 1
              },
              "timestamp_header": {
                "type": "string",
                "minLength": 1
              },
              "format": {
                "type": "string",
                "minLength": 1
              },
              "rotation": {
                "type": "string",
                "minLength": 1
              },
              "replay_window_seconds": {
                "const": 300
              },
              "platform_signature": {
                "type": "string",
                "minLength": 1
              },
              "dedupe": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "header",
              "timestamp_header",
              "format",
              "rotation",
              "replay_window_seconds",
              "platform_signature",
              "dedupe"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "signing",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_alert_endpoint_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opaep_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "url": {
                  "type": "string",
                  "minLength": 9,
                  "maxLength": 500
                },
                "format": {
                  "type": "string",
                  "enum": [
                    "json",
                    "slack"
                  ]
                },
                "event_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "exception.opened",
                      "exception.updated",
                      "case.decided",
                      "statement.issued",
                      "schedule.failed"
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 5,
                  "uniqueItems": true
                },
                "stream_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^opst_[a-f0-9]{24}$"
                  },
                  "maxItems": 50,
                  "uniqueItems": true
                },
                "min_exception_severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "include_details": {
                  "type": "boolean"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "paused",
                    "disabled",
                    "deleted"
                  ]
                },
                "status_reason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "consecutive_failures": {
                  "type": "integer",
                  "minimum": 0
                },
                "skipped_events": {
                  "type": "integer",
                  "minimum": 0
                },
                "last_skipped_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_status": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_attempt_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_success_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "verified_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secret_rotated_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "previous_secret_active": {
                  "type": "boolean"
                },
                "previous_secret_expires_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "health": {
                  "type": "object",
                  "properties": {
                    "window_hours": {
                      "const": 24
                    },
                    "attempts": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "delivered": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failed": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "success_rate": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "latency_ms_p50": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "latency_ms_p95": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending_deliveries": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "dead_letter_deliveries": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "window_hours",
                    "attempts",
                    "delivered",
                    "failed",
                    "success_rate",
                    "latency_ms_p50",
                    "latency_ms_p95",
                    "pending_deliveries",
                    "dead_letter_deliveries"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "workspace_id",
                "label",
                "url",
                "format",
                "event_types",
                "stream_ids",
                "min_exception_severity",
                "include_details",
                "status",
                "status_reason",
                "consecutive_failures",
                "skipped_events",
                "last_skipped_at",
                "last_status",
                "last_attempt_at",
                "last_success_at",
                "verified_at",
                "secret_rotated_at",
                "previous_secret_active",
                "previous_secret_expires_at",
                "created_by",
                "created_at",
                "updated_at",
                "revision",
                "health"
              ],
              "additionalProperties": false
            },
            "maxItems": 10
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "exception.opened",
                "exception.updated",
                "case.decided",
                "statement.issued",
                "schedule.failed"
              ]
            },
            "minItems": 5,
            "maxItems": 5,
            "uniqueItems": true
          },
          "limits": {
            "type": "object",
            "properties": {
              "endpoints_per_workspace": {
                "const": 10
              },
              "max_attempts": {
                "const": 6
              },
              "pending_per_endpoint": {
                "const": 10000
              }
            },
            "required": [
              "endpoints_per_workspace",
              "max_attempts",
              "pending_per_endpoint"
            ],
            "additionalProperties": false
          },
          "signing": {
            "type": "object",
            "properties": {
              "header": {
                "type": "string",
                "minLength": 1
              },
              "timestamp_header": {
                "type": "string",
                "minLength": 1
              },
              "format": {
                "type": "string",
                "minLength": 1
              },
              "rotation": {
                "type": "string",
                "minLength": 1
              },
              "replay_window_seconds": {
                "const": 300
              },
              "platform_signature": {
                "type": "string",
                "minLength": 1
              },
              "dedupe": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "header",
              "timestamp_header",
              "format",
              "rotation",
              "replay_window_seconds",
              "platform_signature",
              "dedupe"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoints",
          "event_types",
          "limits",
          "signing",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_alert_endpoint_pause",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_ping",
      "response_schema": {
        "type": "object",
        "properties": {
          "delivery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[1-9][0-9]{0,15}$"
              },
              "endpoint_id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "event_seq": {
                "type": "integer",
                "minimum": 1
              },
              "redelivery_of": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[1-9][0-9]{0,15}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "requested_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "delivered",
                  "dead",
                  "abandoned"
                ]
              },
              "attempts": {
                "type": "integer",
                "minimum": 0
              },
              "max_attempts": {
                "const": 6
              },
              "next_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_error": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_latency_ms": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "delivered_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "finished_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "endpoint_id",
              "event_seq",
              "redelivery_of",
              "requested_by",
              "status",
              "attempts",
              "max_attempts",
              "next_attempt_at",
              "last_status",
              "last_error",
              "last_latency_ms",
              "created_at",
              "delivered_at",
              "finished_at"
            ],
            "additionalProperties": false
          },
          "event_id": {
            "type": "string",
            "pattern": "^opsig_[a-f0-9]{24}$"
          },
          "endpoint_status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "disabled",
              "deleted"
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "delivery",
          "event_id",
          "endpoint_status",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_replay",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "pattern": "^opaep_[a-f0-9]{24}$"
          },
          "queued": {
            "type": "integer",
            "minimum": 0,
            "maximum": 500
          },
          "dead_letter_remaining": {
            "type": "integer",
            "minimum": 0
          },
          "endpoint_status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "disabled",
              "deleted"
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint_id",
          "queued",
          "dead_letter_remaining",
          "endpoint_status",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "since": {
            "type": "string",
            "format": "date-time"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 100
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_resume",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_rotate",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "secret": {
            "type": "string",
            "pattern": "^opwhsec_[A-Za-z0-9_-]{43}$"
          },
          "signing": {
            "type": "object",
            "properties": {
              "header": {
                "type": "string",
                "minLength": 1
              },
              "timestamp_header": {
                "type": "string",
                "minLength": 1
              },
              "format": {
                "type": "string",
                "minLength": 1
              },
              "rotation": {
                "type": "string",
                "minLength": 1
              },
              "replay_window_seconds": {
                "const": 300
              },
              "platform_signature": {
                "type": "string",
                "minLength": 1
              },
              "dedupe": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "header",
              "timestamp_header",
              "format",
              "rotation",
              "replay_window_seconds",
              "platform_signature",
              "dedupe"
            ],
            "additionalProperties": false
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "secret",
          "signing",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "overlap_hours": {
            "type": "integer",
            "minimum": 0,
            "maximum": 72,
            "default": 24
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_alert_endpoint_update",
      "response_schema": {
        "type": "object",
        "properties": {
          "endpoint": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opaep_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "url": {
                "type": "string",
                "minLength": 9,
                "maxLength": 500
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "slack"
                ]
              },
              "event_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed"
                  ]
                },
                "minItems": 1,
                "maxItems": 5,
                "uniqueItems": true
              },
              "stream_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "maxItems": 50,
                "uniqueItems": true
              },
              "min_exception_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "include_details": {
                "type": "boolean"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "disabled",
                  "deleted"
                ]
              },
              "status_reason": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "consecutive_failures": {
                "type": "integer",
                "minimum": 0
              },
              "skipped_events": {
                "type": "integer",
                "minimum": 0
              },
              "last_skipped_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_status": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_attempt_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_success_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "verified_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secret_rotated_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "previous_secret_active": {
                "type": "boolean"
              },
              "previous_secret_expires_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "health": {
                "type": "object",
                "properties": {
                  "window_hours": {
                    "const": 24
                  },
                  "attempts": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "delivered": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failed": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p50": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "latency_ms_p95": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pending_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "dead_letter_deliveries": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "window_hours",
                  "attempts",
                  "delivered",
                  "failed",
                  "success_rate",
                  "latency_ms_p50",
                  "latency_ms_p95",
                  "pending_deliveries",
                  "dead_letter_deliveries"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "label",
              "url",
              "format",
              "event_types",
              "stream_ids",
              "min_exception_severity",
              "include_details",
              "status",
              "status_reason",
              "consecutive_failures",
              "skipped_events",
              "last_skipped_at",
              "last_status",
              "last_attempt_at",
              "last_success_at",
              "verified_at",
              "secret_rotated_at",
              "previous_secret_active",
              "previous_secret_expires_at",
              "created_by",
              "created_at",
              "updated_at",
              "revision",
              "health"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "endpoint",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "url": {
            "type": "string",
            "minLength": 9,
            "maxLength": 500
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "exception.opened",
                "exception.updated",
                "case.decided",
                "statement.issued",
                "schedule.failed"
              ]
            },
            "minItems": 1,
            "maxItems": 5,
            "uniqueItems": true
          },
          "stream_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^opst_[a-f0-9]{24}$"
            },
            "maxItems": 50,
            "uniqueItems": true
          },
          "min_exception_severity": {
            "type": "string",
            "enum": [
              "debug",
              "info",
              "warning",
              "error",
              "critical"
            ],
            "default": "warning"
          },
          "include_details": {
            "type": "boolean",
            "default": false
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "slack"
            ],
            "default": "json"
          }
        },
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "label"
            ]
          },
          {
            "required": [
              "url"
            ]
          },
          {
            "required": [
              "event_types"
            ]
          },
          {
            "required": [
              "stream_ids"
            ]
          },
          {
            "required": [
              "min_exception_severity"
            ]
          },
          {
            "required": [
              "include_details"
            ]
          },
          {
            "required": [
              "format"
            ]
          }
        ]
      }
    },
    {
      "operation_id": "operations_audit_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "audit": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "seq": {
                  "type": "integer",
                  "minimum": 1
                },
                "id": {
                  "type": "string",
                  "pattern": "^opa_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "action": {
                  "type": "string",
                  "minLength": 1
                },
                "details": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "previous_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "entry_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "seq",
                "id",
                "workspace_id",
                "actor_tenant_id",
                "action",
                "details",
                "previous_hash",
                "entry_hash",
                "created_at"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "snapshot_seq": {
            "type": "integer",
            "minimum": 0
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "audit",
          "next_cursor",
          "limit",
          "snapshot_seq",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_audit_verify",
      "response_schema": {
        "type": "object",
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "checked": {
            "type": "integer",
            "minimum": 0
          },
          "snapshot_seq": {
            "type": "integer",
            "minimum": 0
          },
          "head": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "spec": {
            "const": "rs-operations-audit/1"
          },
          "first_invalid_seq": {
            "type": "integer",
            "minimum": 1
          },
          "private": {
            "const": true
          }
        },
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "valid": {
                "type": "boolean"
              },
              "checked": {
                "type": "integer",
                "minimum": 0
              },
              "snapshot_seq": {
                "type": "integer",
                "minimum": 0
              },
              "head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "spec": {
                "const": "rs-operations-audit/1"
              },
              "private": {
                "const": true
              }
            },
            "required": [
              "valid",
              "checked",
              "snapshot_seq",
              "head",
              "spec",
              "private"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "valid": {
                "const": false
              },
              "checked": {
                "type": "integer",
                "minimum": 0
              },
              "first_invalid_seq": {
                "type": "integer",
                "minimum": 1
              },
              "snapshot_seq": {
                "type": "integer",
                "minimum": 0
              },
              "private": {
                "const": true
              }
            },
            "required": [
              "valid",
              "checked",
              "first_invalid_seq",
              "snapshot_seq",
              "private"
            ],
            "additionalProperties": false
          }
        ]
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_batch_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "pattern": "^opb_[a-f0-9]{24}$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "atomic",
              "partial"
            ]
          },
          "accepted": {
            "type": "integer",
            "minimum": 0
          },
          "duplicates": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate"
                      ]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "client_event_id": {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "received_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "action_type": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "success",
                            "failure",
                            "unknown"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "debug",
                            "info",
                            "warning",
                            "error",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "action_sha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "maxItems": 16,
                          "uniqueItems": true
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "request_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "previous_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "event_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "ledger_seq": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "stream_id",
                        "client_event_id",
                        "sequence",
                        "occurred_at",
                        "received_at",
                        "action_type",
                        "outcome",
                        "severity",
                        "summary",
                        "action_sha256",
                        "tags",
                        "actor_tenant_id",
                        "request_hash",
                        "previous_hash",
                        "event_hash",
                        "ledger_seq"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "event"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "const": "rejected"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "operations_invalid",
                            "operations_forbidden",
                            "operations_not_found",
                            "operations_conflict",
                            "operations_limit",
                            "operations_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "integer",
                          "minimum": 400,
                          "maximum": 599
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "error"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "replayed": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "batch_id",
          "mode",
          "accepted",
          "duplicates",
          "rejected",
          "results",
          "replayed",
          "created_at"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_case_assign",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "reviewer_tenant_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "expected_version",
          "reviewer_tenant_id"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_close",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "expected_version",
          "reason"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "description": {
            "type": "string",
            "maxLength": 8000
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "checklist": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240
                },
                "min_events": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "default": 1
                },
                "action_type": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "outcome": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "severity": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                }
              },
              "required": [
                "id",
                "label"
              ],
              "additionalProperties": true
            },
            "maxItems": 30
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^act_[a-f0-9]{20}$"
            },
            "maxItems": 100,
            "uniqueItems": true
          }
        },
        "required": [
          "title"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_decide",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "needs_information",
              "rejected"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^act_[a-f0-9]{20}$"
            },
            "maxItems": 100,
            "uniqueItems": true
          }
        },
        "required": [
          "expected_version",
          "decision",
          "reason",
          "event_ids"
        ],
        "additionalProperties": true,
        "allOf": [
          {
            "if": {
              "properties": {
                "decision": {
                  "const": "accepted"
                }
              },
              "required": [
                "decision"
              ]
            },
            "then": {
              "properties": {
                "event_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^act_[a-f0-9]{20}$"
                  },
                  "minItems": 1,
                  "maxItems": 100,
                  "uniqueItems": true
                }
              }
            }
          }
        ]
      }
    },
    {
      "operation_id": "operations_case_events_attach",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^act_[a-f0-9]{20}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true
          }
        },
        "required": [
          "expected_version",
          "event_ids"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_events_detach",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^act_[a-f0-9]{20}$"
            },
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true
          }
        },
        "required": [
          "expected_version",
          "event_ids"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_export",
      "response_schema": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "object",
            "properties": {
              "spec": {
                "const": "rs-operations-case-evidence/1"
              },
              "export_id": {
                "type": "string",
                "pattern": "^opcex_[a-f0-9]{24}$"
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "issuer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "key_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "public_key_pem": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "id",
                  "key_id",
                  "public_key_pem"
                ],
                "additionalProperties": false
              },
              "snapshot": {
                "type": "object",
                "properties": {
                  "case": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^opcase_[a-f0-9]{24}$"
                      },
                      "workspace_id": {
                        "type": "string",
                        "pattern": "^opw_[a-f0-9]{24}$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 180
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 8000
                      },
                      "severity": {
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high",
                          "critical"
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "open",
                          "closed"
                        ]
                      },
                      "reviewer_tenant_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^ten_[a-f0-9]{20}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "latest_decision": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "needs_information",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "created_by": {
                        "type": "string",
                        "pattern": "^ten_[a-f0-9]{20}$"
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "closed_at": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "reviewer_active": {
                        "type": "boolean"
                      },
                      "event_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "selected_event_count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "missing_event_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "checklist": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 48,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240
                            },
                            "min_events": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "action_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "outcome": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "severity": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "stream_id": {
                              "type": "string",
                              "pattern": "^opst_[a-f0-9]{24}$"
                            },
                            "actual_events": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "complete": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "min_events",
                            "actual_events",
                            "complete"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 30
                      },
                      "checklist_complete": {
                        "type": "boolean"
                      },
                      "review_notice": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "id",
                      "workspace_id",
                      "title",
                      "description",
                      "severity",
                      "state",
                      "reviewer_tenant_id",
                      "latest_decision",
                      "created_by",
                      "created_at",
                      "updated_at",
                      "closed_at",
                      "version",
                      "reviewer_active",
                      "event_ids",
                      "selected_event_count",
                      "missing_event_ids",
                      "checklist",
                      "checklist_complete",
                      "review_notice"
                    ],
                    "additionalProperties": false
                  },
                  "notes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^opnote_[a-f0-9]{24}$"
                        },
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "author_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8000
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "id",
                        "case_id",
                        "workspace_id",
                        "author_tenant_id",
                        "body",
                        "created_at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 500
                  },
                  "decisions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^opdecision_[a-f0-9]{24}$"
                        },
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "reviewer_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "decision": {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "needs_information",
                            "rejected"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8000
                        },
                        "event_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^act_[a-f0-9]{20}$"
                          },
                          "maxItems": 100,
                          "uniqueItems": true
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "id",
                        "case_id",
                        "workspace_id",
                        "reviewer_tenant_id",
                        "decision",
                        "reason",
                        "event_ids",
                        "created_at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 200
                  },
                  "event_history": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "attached",
                            "detached"
                          ]
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "case_id",
                        "workspace_id",
                        "sequence",
                        "event_id",
                        "action",
                        "actor_tenant_id",
                        "at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "timeline": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "created",
                            "metadata_updated",
                            "reviewer_assigned",
                            "events_attached",
                            "events_detached",
                            "note_added",
                            "decision_recorded",
                            "closed",
                            "reopened"
                          ]
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "detail": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": true
                        },
                        "previous_hash": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "record_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "case_id",
                        "workspace_id",
                        "sequence",
                        "kind",
                        "actor_tenant_id",
                        "at",
                        "case_version",
                        "detail",
                        "previous_hash",
                        "record_hash"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 2000
                  }
                },
                "required": [
                  "case",
                  "notes",
                  "decisions",
                  "event_history",
                  "timeline"
                ],
                "additionalProperties": false
              },
              "snapshot_sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "records": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "record": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^act_[a-f0-9]{20}$"
                            },
                            "workspace_id": {
                              "type": "string",
                              "pattern": "^opw_[a-f0-9]{24}$"
                            },
                            "stream_id": {
                              "type": "string",
                              "pattern": "^opst_[a-f0-9]{24}$"
                            },
                            "client_event_id": {
                              "type": "string",
                              "maxLength": 160,
                              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "occurred_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "received_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "action_type": {
                              "type": "string",
                              "maxLength": 96,
                              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                            },
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "success",
                                "failure",
                                "unknown"
                              ]
                            },
                            "severity": {
                              "type": "string",
                              "enum": [
                                "debug",
                                "info",
                                "warning",
                                "error",
                                "critical"
                              ]
                            },
                            "summary": {
                              "type": "string",
                              "maxLength": 2048
                            },
                            "action_sha256": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "maxItems": 16,
                              "uniqueItems": true
                            },
                            "actor_tenant_id": {
                              "type": "string",
                              "pattern": "^ten_[a-f0-9]{20}$"
                            },
                            "request_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "previous_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "event_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "ledger_seq": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "workspace_id",
                            "stream_id",
                            "client_event_id",
                            "sequence",
                            "occurred_at",
                            "received_at",
                            "action_type",
                            "outcome",
                            "severity",
                            "summary",
                            "action_sha256",
                            "tags",
                            "actor_tenant_id",
                            "request_hash",
                            "previous_hash",
                            "event_hash",
                            "ledger_seq"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "spec": {
                              "const": "rs-activity-evidence/1"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^act_[a-f0-9]{20}$"
                            },
                            "issued_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "issuer": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "key_id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "public_key_pem": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "block_key_status": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "current",
                                        "retired",
                                        "revoked",
                                        "unknown"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "key_id",
                                "public_key_pem",
                                "block_key_status"
                              ],
                              "additionalProperties": false
                            },
                            "opening": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true
                            },
                            "salt": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{32}$"
                            },
                            "commitment": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "ledger": {
                              "type": "object",
                              "properties": {
                                "entry": {
                                  "type": "object",
                                  "properties": {
                                    "seq": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "type": {
                                      "const": "activity.receipt"
                                    },
                                    "subject": {
                                      "type": "string"
                                    },
                                    "payload": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": true
                                    },
                                    "texts": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": {
                                        "type": "object",
                                        "properties": {
                                          "value": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "salt": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "redacted_at": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "value",
                                          "salt",
                                          "redacted_at"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "data": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": true
                                    },
                                    "payload_hash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "leaf_hash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "block_height": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "seq",
                                    "at",
                                    "type",
                                    "subject",
                                    "payload",
                                    "texts",
                                    "data",
                                    "payload_hash",
                                    "leaf_hash",
                                    "block_height"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "sealed"
                                  ]
                                },
                                "block": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "v": {
                                          "const": 1
                                        },
                                        "height": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "prev_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "merkle_root": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "first_seq": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "last_seq": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "entry_count": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "key_id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "block_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "signature": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "public_key_pem": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "v",
                                        "height",
                                        "prev_hash",
                                        "merkle_root",
                                        "first_seq",
                                        "last_seq",
                                        "entry_count",
                                        "at",
                                        "key_id",
                                        "block_hash",
                                        "signature",
                                        "public_key_pem"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "proof": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "leaf_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "path": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "side": {
                                                "type": "string",
                                                "enum": [
                                                  "L",
                                                  "R"
                                                ]
                                              },
                                              "hash": {
                                                "type": "string",
                                                "pattern": "^[a-f0-9]{64}$"
                                              }
                                            },
                                            "required": [
                                              "side",
                                              "hash"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "merkle_root": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "how_to_verify": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "leaf_hash",
                                        "index",
                                        "path",
                                        "merkle_root",
                                        "how_to_verify"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entry",
                                "status",
                                "block",
                                "proof"
                              ],
                              "additionalProperties": false
                            },
                            "evidence_note": {
                              "type": "string",
                              "minLength": 1
                            },
                            "verification": {
                              "type": "object",
                              "properties": {
                                "issuer_key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "commitment": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "inclusion": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "receipt_id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "finality": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "action_digest": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "issuer_key",
                                "commitment",
                                "inclusion",
                                "receipt_id",
                                "finality",
                                "action_digest"
                              ],
                              "additionalProperties": false
                            },
                            "export_signature": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "spec",
                            "id",
                            "issued_at",
                            "issuer",
                            "opening",
                            "salt",
                            "commitment",
                            "ledger",
                            "evidence_note",
                            "verification",
                            "export_signature"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evidence_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "availability": {
                      "type": "string",
                      "enum": [
                        "sealed",
                        "pending",
                        "missing"
                      ]
                    }
                  },
                  "required": [
                    "event_id",
                    "record",
                    "record_sha256",
                    "evidence",
                    "evidence_sha256",
                    "availability"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "completeness": {
                "type": "object",
                "properties": {
                  "selected_event_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "sealed_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "pending_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "missing_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "history_complete": {
                    "type": "boolean"
                  },
                  "proofs_complete": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "selected_event_count",
                  "sealed_count",
                  "pending_count",
                  "missing_count",
                  "history_complete",
                  "proofs_complete"
                ],
                "additionalProperties": false
              },
              "limits": {
                "type": "object",
                "properties": {
                  "visibility": {
                    "const": "private"
                  },
                  "independent_finality_verified": {
                    "const": false
                  },
                  "claim_execution_proven": {
                    "const": false
                  },
                  "legal_compliance_proven": {
                    "const": false
                  },
                  "case_history_independently_anchored": {
                    "const": false
                  },
                  "issuer_trust": {
                    "type": "string",
                    "minLength": 21
                  },
                  "privacy": {
                    "type": "string",
                    "minLength": 21
                  },
                  "snapshot": {
                    "type": "string",
                    "minLength": 21
                  },
                  "review": {
                    "type": "string",
                    "minLength": 21
                  },
                  "finality": {
                    "type": "string",
                    "minLength": 21
                  }
                },
                "required": [
                  "visibility",
                  "independent_finality_verified",
                  "claim_execution_proven",
                  "legal_compliance_proven",
                  "case_history_independently_anchored",
                  "issuer_trust",
                  "privacy",
                  "snapshot",
                  "review",
                  "finality"
                ],
                "additionalProperties": false
              },
              "export_signature": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "spec",
              "export_id",
              "issued_at",
              "issuer",
              "snapshot",
              "snapshot_sha256",
              "records",
              "completeness",
              "limits",
              "export_signature"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "manifest"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_case_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "cases": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opcase_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 180
                },
                "description": {
                  "type": "string",
                  "maxLength": 8000
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high",
                    "critical"
                  ]
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "open",
                    "closed"
                  ]
                },
                "reviewer_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "latest_decision": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "closed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "reviewer_active": {
                  "type": "boolean"
                },
                "event_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^act_[a-f0-9]{20}$"
                  },
                  "maxItems": 100,
                  "uniqueItems": true
                },
                "selected_event_count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                },
                "missing_event_ids": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^act_[a-f0-9]{20}$"
                  },
                  "maxItems": 100,
                  "uniqueItems": true
                },
                "checklist": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 48,
                        "pattern": "^[a-zA-Z0-9_-]+$"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 240
                      },
                      "min_events": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "action_type": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "outcome": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "severity": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "stream_id": {
                        "type": "string",
                        "pattern": "^opst_[a-f0-9]{24}$"
                      },
                      "actual_events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "complete": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "min_events",
                      "actual_events",
                      "complete"
                    ],
                    "additionalProperties": false
                  },
                  "maxItems": 30
                },
                "checklist_complete": {
                  "type": "boolean"
                },
                "review_notice": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "workspace_id",
                "title",
                "description",
                "severity",
                "state",
                "reviewer_tenant_id",
                "latest_decision",
                "created_by",
                "created_at",
                "updated_at",
                "closed_at",
                "version",
                "reviewer_active",
                "event_ids",
                "selected_event_count",
                "missing_event_ids",
                "checklist",
                "checklist_complete",
                "review_notice"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "cases",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_case_note_add",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "body": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "expected_version",
          "body"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_reopen",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 8000
          }
        },
        "required": [
          "expected_version",
          "reason"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_case_timeline",
      "response_schema": {
        "type": "object",
        "properties": {
          "timeline": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "case_id": {
                  "type": "string",
                  "pattern": "^opcase_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "created",
                    "metadata_updated",
                    "reviewer_assigned",
                    "events_attached",
                    "events_detached",
                    "note_added",
                    "decision_recorded",
                    "closed",
                    "reopened"
                  ]
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                },
                "case_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "detail": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "previous_hash": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "record_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                }
              },
              "required": [
                "case_id",
                "workspace_id",
                "sequence",
                "kind",
                "actor_tenant_id",
                "at",
                "case_version",
                "detail",
                "previous_hash",
                "record_hash"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "snapshot_version": {
            "type": "integer",
            "minimum": 1
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "timeline",
          "snapshot_version",
          "next_cursor"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_case_update",
      "response_schema": {
        "type": "object",
        "properties": {
          "case": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opcase_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 180
              },
              "description": {
                "type": "string",
                "maxLength": 8000
              },
              "severity": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "critical"
                ]
              },
              "state": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              },
              "reviewer_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "latest_decision": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "needs_information",
                      "rejected"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "reviewer_active": {
                "type": "boolean"
              },
              "event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "maxItems": 100,
                "uniqueItems": true
              },
              "checklist": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 48,
                      "pattern": "^[a-zA-Z0-9_-]+$"
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 240
                    },
                    "min_events": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "action_type": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "outcome": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "severity": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 80
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "actual_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "complete": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "id",
                    "label",
                    "min_events",
                    "actual_events",
                    "complete"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 30
              },
              "checklist_complete": {
                "type": "boolean"
              },
              "review_notice": {
                "type": "string",
                "minLength": 1
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "occurred_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "action_type": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "outcome": {
                      "type": "string",
                      "enum": [
                        "success",
                        "failure",
                        "unknown"
                      ]
                    },
                    "severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "summary": {
                      "type": "string",
                      "maxLength": 2048
                    },
                    "action_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 16,
                      "uniqueItems": true
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "previous_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "workspace_id",
                    "stream_id",
                    "client_event_id",
                    "sequence",
                    "occurred_at",
                    "received_at",
                    "action_type",
                    "outcome",
                    "severity",
                    "summary",
                    "action_sha256",
                    "tags",
                    "actor_tenant_id",
                    "request_hash",
                    "previous_hash",
                    "event_hash",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opnote_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "author_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "body": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "author_tenant_id",
                    "body",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 500
              },
              "decisions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "pattern": "^opdecision_[a-f0-9]{24}$"
                    },
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "reviewer_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "decision": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "needs_information",
                        "rejected"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8000
                    },
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "created_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "id",
                    "case_id",
                    "workspace_id",
                    "reviewer_tenant_id",
                    "decision",
                    "reason",
                    "event_ids",
                    "created_at",
                    "case_version"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 200
              },
              "event_history": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "action": {
                      "type": "string",
                      "enum": [
                        "attached",
                        "detached"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "event_id",
                    "action",
                    "actor_tenant_id",
                    "at",
                    "case_version"
                  ],
                  "additionalProperties": false
                }
              },
              "timeline": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "case_id": {
                      "type": "string",
                      "pattern": "^opcase_[a-f0-9]{24}$"
                    },
                    "workspace_id": {
                      "type": "string",
                      "pattern": "^opw_[a-f0-9]{24}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "created",
                        "metadata_updated",
                        "reviewer_assigned",
                        "events_attached",
                        "events_detached",
                        "note_added",
                        "decision_recorded",
                        "closed",
                        "reopened"
                      ]
                    },
                    "actor_tenant_id": {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "case_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "detail": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "previous_hash": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    }
                  },
                  "required": [
                    "case_id",
                    "workspace_id",
                    "sequence",
                    "kind",
                    "actor_tenant_id",
                    "at",
                    "case_version",
                    "detail",
                    "previous_hash",
                    "record_hash"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1,
                "maxItems": 2000
              }
            },
            "required": [
              "id",
              "workspace_id",
              "title",
              "description",
              "severity",
              "state",
              "reviewer_tenant_id",
              "latest_decision",
              "created_by",
              "created_at",
              "updated_at",
              "closed_at",
              "version",
              "reviewer_active",
              "event_ids",
              "selected_event_count",
              "missing_event_ids",
              "checklist",
              "checklist_complete",
              "review_notice",
              "events",
              "notes",
              "decisions",
              "event_history",
              "timeline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "case"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 180
          },
          "description": {
            "type": "string",
            "maxLength": 8000
          },
          "severity": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high",
              "critical"
            ]
          },
          "checklist": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 48,
                  "pattern": "^[a-zA-Z0-9_-]+$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 240
                },
                "min_events": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100,
                  "default": 1
                },
                "action_type": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "outcome": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "severity": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 80
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                }
              },
              "required": [
                "id",
                "label"
              ],
              "additionalProperties": true
            },
            "maxItems": 30
          }
        },
        "required": [
          "expected_version"
        ],
        "additionalProperties": true,
        "anyOf": [
          {
            "required": [
              "title"
            ]
          },
          {
            "required": [
              "description"
            ]
          },
          {
            "required": [
              "severity"
            ]
          },
          {
            "required": [
              "checklist"
            ]
          }
        ]
      }
    },
    {
      "operation_id": "operations_case_verify",
      "response_schema": {
        "type": "object",
        "properties": {
          "verification": {
            "type": "object",
            "properties": {
              "spec": {
                "const": "rs-operations-case-evidence-verification/1"
              },
              "verified": {
                "type": "boolean"
              },
              "export_signature_valid": {
                "type": "boolean"
              },
              "issuer_authenticated": {
                "type": "boolean"
              },
              "snapshot_digest_valid": {
                "type": "boolean"
              },
              "history_valid": {
                "type": "boolean"
              },
              "selection_complete": {
                "type": "boolean"
              },
              "checklist_valid": {
                "type": "boolean"
              },
              "limits_valid": {
                "type": "boolean"
              },
              "selected_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "verified_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "pending_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "missing_event_count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "records": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "record_digest_valid": {
                      "type": "boolean"
                    },
                    "evidence_digest_valid": {
                      "type": "boolean"
                    },
                    "event_hash_valid": {
                      "type": "boolean"
                    },
                    "opening_binding_valid": {
                      "type": "boolean"
                    },
                    "verified": {
                      "type": "boolean"
                    },
                    "evidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "spec": {
                              "const": "rs-activity-evidence-verification/1"
                            },
                            "verified": {
                              "type": "boolean"
                            },
                            "verified_record": {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "receipt_id": {
                                      "type": "string",
                                      "pattern": "^act_[a-f0-9]{20}$"
                                    },
                                    "ledger_seq": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "block_height": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "issuer_id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "export_key_id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "block_key_id": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "key_status_attested_at": {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  },
                                  "required": [
                                    "receipt_id",
                                    "ledger_seq",
                                    "block_height",
                                    "issuer_id",
                                    "export_key_id",
                                    "block_key_id",
                                    "key_status_attested_at"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "export_signature_valid": {
                              "type": "boolean"
                            },
                            "issuer_authenticated": {
                              "type": "boolean"
                            },
                            "commitment_valid": {
                              "type": "boolean"
                            },
                            "entry_valid": {
                              "type": "boolean"
                            },
                            "inclusion_valid": {
                              "type": "boolean"
                            },
                            "block_signature_valid": {
                              "type": "boolean"
                            },
                            "block_key_accepted": {
                              "type": "boolean"
                            },
                            "receipt_id_binding": {
                              "type": "string",
                              "enum": [
                                "none",
                                "commitment",
                                "export_signature"
                              ]
                            },
                            "action_digest_present": {
                              "type": "boolean"
                            },
                            "action_digest_matches": {
                              "anyOf": [
                                {
                                  "type": "boolean"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "independent_finality_verified": {
                              "const": false
                            },
                            "claim_execution_proven": {
                              "const": false
                            },
                            "errors": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1
                              }
                            }
                          },
                          "required": [
                            "spec",
                            "verified",
                            "verified_record",
                            "export_signature_valid",
                            "issuer_authenticated",
                            "commitment_valid",
                            "entry_valid",
                            "inclusion_valid",
                            "block_signature_valid",
                            "block_key_accepted",
                            "receipt_id_binding",
                            "action_digest_present",
                            "action_digest_matches",
                            "independent_finality_verified",
                            "claim_execution_proven",
                            "errors"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "event_id",
                    "record_digest_valid",
                    "evidence_digest_valid",
                    "event_hash_valid",
                    "opening_binding_valid",
                    "verified",
                    "evidence"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "independent_finality_verified": {
                "const": false
              },
              "claim_execution_proven": {
                "const": false
              },
              "legal_compliance_proven": {
                "const": false
              },
              "case_history_independently_anchored": {
                "const": false
              },
              "errors": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "spec",
              "verified",
              "export_signature_valid",
              "issuer_authenticated",
              "snapshot_digest_valid",
              "history_valid",
              "selection_complete",
              "checklist_valid",
              "limits_valid",
              "selected_event_count",
              "verified_event_count",
              "pending_event_count",
              "missing_event_count",
              "records",
              "independent_finality_verified",
              "claim_execution_proven",
              "legal_compliance_proven",
              "case_history_independently_anchored",
              "errors"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "verification"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "manifest": {
            "type": "object",
            "properties": {
              "spec": {
                "const": "rs-operations-case-evidence/1"
              },
              "export_id": {
                "type": "string",
                "pattern": "^opcex_[a-f0-9]{24}$"
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "issuer": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "key_id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "public_key_pem": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "id",
                  "key_id",
                  "public_key_pem"
                ],
                "additionalProperties": false
              },
              "snapshot": {
                "type": "object",
                "properties": {
                  "case": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^opcase_[a-f0-9]{24}$"
                      },
                      "workspace_id": {
                        "type": "string",
                        "pattern": "^opw_[a-f0-9]{24}$"
                      },
                      "title": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 180
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 8000
                      },
                      "severity": {
                        "type": "string",
                        "enum": [
                          "low",
                          "medium",
                          "high",
                          "critical"
                        ]
                      },
                      "state": {
                        "type": "string",
                        "enum": [
                          "open",
                          "closed"
                        ]
                      },
                      "reviewer_tenant_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^ten_[a-f0-9]{20}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "latest_decision": {
                        "anyOf": [
                          {
                            "type": "string",
                            "enum": [
                              "accepted",
                              "needs_information",
                              "rejected"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "created_by": {
                        "type": "string",
                        "pattern": "^ten_[a-f0-9]{20}$"
                      },
                      "created_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "updated_at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "closed_at": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "version": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "reviewer_active": {
                        "type": "boolean"
                      },
                      "event_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "selected_event_count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "missing_event_ids": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "maxItems": 100,
                        "uniqueItems": true
                      },
                      "checklist": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 48,
                              "pattern": "^[a-zA-Z0-9_-]+$"
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 240
                            },
                            "min_events": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "action_type": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "outcome": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "severity": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80
                            },
                            "stream_id": {
                              "type": "string",
                              "pattern": "^opst_[a-f0-9]{24}$"
                            },
                            "actual_events": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "complete": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "id",
                            "label",
                            "min_events",
                            "actual_events",
                            "complete"
                          ],
                          "additionalProperties": false
                        },
                        "maxItems": 30
                      },
                      "checklist_complete": {
                        "type": "boolean"
                      },
                      "review_notice": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "id",
                      "workspace_id",
                      "title",
                      "description",
                      "severity",
                      "state",
                      "reviewer_tenant_id",
                      "latest_decision",
                      "created_by",
                      "created_at",
                      "updated_at",
                      "closed_at",
                      "version",
                      "reviewer_active",
                      "event_ids",
                      "selected_event_count",
                      "missing_event_ids",
                      "checklist",
                      "checklist_complete",
                      "review_notice"
                    ],
                    "additionalProperties": false
                  },
                  "notes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^opnote_[a-f0-9]{24}$"
                        },
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "author_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "body": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8000
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "id",
                        "case_id",
                        "workspace_id",
                        "author_tenant_id",
                        "body",
                        "created_at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 500
                  },
                  "decisions": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^opdecision_[a-f0-9]{24}$"
                        },
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "reviewer_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "decision": {
                          "type": "string",
                          "enum": [
                            "accepted",
                            "needs_information",
                            "rejected"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8000
                        },
                        "event_ids": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^act_[a-f0-9]{20}$"
                          },
                          "maxItems": 100,
                          "uniqueItems": true
                        },
                        "created_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "id",
                        "case_id",
                        "workspace_id",
                        "reviewer_tenant_id",
                        "decision",
                        "reason",
                        "event_ids",
                        "created_at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 200
                  },
                  "event_history": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "action": {
                          "type": "string",
                          "enum": [
                            "attached",
                            "detached"
                          ]
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "case_id",
                        "workspace_id",
                        "sequence",
                        "event_id",
                        "action",
                        "actor_tenant_id",
                        "at",
                        "case_version"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "timeline": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "case_id": {
                          "type": "string",
                          "pattern": "^opcase_[a-f0-9]{24}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "created",
                            "metadata_updated",
                            "reviewer_assigned",
                            "events_attached",
                            "events_detached",
                            "note_added",
                            "decision_recorded",
                            "closed",
                            "reopened"
                          ]
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "case_version": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "detail": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": true
                        },
                        "previous_hash": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "record_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        }
                      },
                      "required": [
                        "case_id",
                        "workspace_id",
                        "sequence",
                        "kind",
                        "actor_tenant_id",
                        "at",
                        "case_version",
                        "detail",
                        "previous_hash",
                        "record_hash"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 2000
                  }
                },
                "required": [
                  "case",
                  "notes",
                  "decisions",
                  "event_history",
                  "timeline"
                ],
                "additionalProperties": false
              },
              "snapshot_sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "records": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "record": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^act_[a-f0-9]{20}$"
                            },
                            "workspace_id": {
                              "type": "string",
                              "pattern": "^opw_[a-f0-9]{24}$"
                            },
                            "stream_id": {
                              "type": "string",
                              "pattern": "^opst_[a-f0-9]{24}$"
                            },
                            "client_event_id": {
                              "type": "string",
                              "maxLength": 160,
                              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                            },
                            "sequence": {
                              "type": "integer",
                              "minimum": 1
                            },
                            "occurred_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "received_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "action_type": {
                              "type": "string",
                              "maxLength": 96,
                              "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                            },
                            "outcome": {
                              "type": "string",
                              "enum": [
                                "success",
                                "failure",
                                "unknown"
                              ]
                            },
                            "severity": {
                              "type": "string",
                              "enum": [
                                "debug",
                                "info",
                                "warning",
                                "error",
                                "critical"
                              ]
                            },
                            "summary": {
                              "type": "string",
                              "maxLength": 2048
                            },
                            "action_sha256": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "tags": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "maxItems": 16,
                              "uniqueItems": true
                            },
                            "actor_tenant_id": {
                              "type": "string",
                              "pattern": "^ten_[a-f0-9]{20}$"
                            },
                            "request_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "previous_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "event_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "ledger_seq": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "id",
                            "workspace_id",
                            "stream_id",
                            "client_event_id",
                            "sequence",
                            "occurred_at",
                            "received_at",
                            "action_type",
                            "outcome",
                            "severity",
                            "summary",
                            "action_sha256",
                            "tags",
                            "actor_tenant_id",
                            "request_hash",
                            "previous_hash",
                            "event_hash",
                            "ledger_seq"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "record_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evidence": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "spec": {
                              "const": "rs-activity-evidence/1"
                            },
                            "id": {
                              "type": "string",
                              "pattern": "^act_[a-f0-9]{20}$"
                            },
                            "issued_at": {
                              "type": "string",
                              "format": "date-time"
                            },
                            "issuer": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "key_id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "public_key_pem": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "block_key_status": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "enum": [
                                        "current",
                                        "retired",
                                        "revoked",
                                        "unknown"
                                      ]
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "id",
                                "key_id",
                                "public_key_pem",
                                "block_key_status"
                              ],
                              "additionalProperties": false
                            },
                            "opening": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": true
                            },
                            "salt": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{32}$"
                            },
                            "commitment": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            "ledger": {
                              "type": "object",
                              "properties": {
                                "entry": {
                                  "type": "object",
                                  "properties": {
                                    "seq": {
                                      "type": "integer",
                                      "minimum": 1
                                    },
                                    "at": {
                                      "type": "string",
                                      "format": "date-time"
                                    },
                                    "type": {
                                      "const": "activity.receipt"
                                    },
                                    "subject": {
                                      "type": "string"
                                    },
                                    "payload": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": true
                                    },
                                    "texts": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": {
                                        "type": "object",
                                        "properties": {
                                          "value": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "salt": {
                                            "anyOf": [
                                              {
                                                "type": "string"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          },
                                          "redacted_at": {
                                            "anyOf": [
                                              {
                                                "type": "string",
                                                "format": "date-time"
                                              },
                                              {
                                                "type": "null"
                                              }
                                            ]
                                          }
                                        },
                                        "required": [
                                          "value",
                                          "salt",
                                          "redacted_at"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "data": {
                                      "type": "object",
                                      "properties": {},
                                      "additionalProperties": true
                                    },
                                    "payload_hash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "leaf_hash": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "block_height": {
                                      "anyOf": [
                                        {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "seq",
                                    "at",
                                    "type",
                                    "subject",
                                    "payload",
                                    "texts",
                                    "data",
                                    "payload_hash",
                                    "leaf_hash",
                                    "block_height"
                                  ],
                                  "additionalProperties": false
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "pending",
                                    "sealed"
                                  ]
                                },
                                "block": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "v": {
                                          "const": 1
                                        },
                                        "height": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "prev_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "merkle_root": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "first_seq": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "last_seq": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "entry_count": {
                                          "type": "integer",
                                          "minimum": 1
                                        },
                                        "at": {
                                          "type": "string",
                                          "format": "date-time"
                                        },
                                        "key_id": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "block_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "signature": {
                                          "type": "string",
                                          "minLength": 1
                                        },
                                        "public_key_pem": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "v",
                                        "height",
                                        "prev_hash",
                                        "merkle_root",
                                        "first_seq",
                                        "last_seq",
                                        "entry_count",
                                        "at",
                                        "key_id",
                                        "block_hash",
                                        "signature",
                                        "public_key_pem"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "proof": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "leaf_hash": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "index": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "path": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "side": {
                                                "type": "string",
                                                "enum": [
                                                  "L",
                                                  "R"
                                                ]
                                              },
                                              "hash": {
                                                "type": "string",
                                                "pattern": "^[a-f0-9]{64}$"
                                              }
                                            },
                                            "required": [
                                              "side",
                                              "hash"
                                            ],
                                            "additionalProperties": false
                                          }
                                        },
                                        "merkle_root": {
                                          "type": "string",
                                          "pattern": "^[a-f0-9]{64}$"
                                        },
                                        "how_to_verify": {
                                          "type": "string",
                                          "minLength": 1
                                        }
                                      },
                                      "required": [
                                        "leaf_hash",
                                        "index",
                                        "path",
                                        "merkle_root",
                                        "how_to_verify"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "entry",
                                "status",
                                "block",
                                "proof"
                              ],
                              "additionalProperties": false
                            },
                            "evidence_note": {
                              "type": "string",
                              "minLength": 1
                            },
                            "verification": {
                              "type": "object",
                              "properties": {
                                "issuer_key": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "commitment": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "inclusion": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "receipt_id": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "finality": {
                                  "type": "string",
                                  "minLength": 1
                                },
                                "action_digest": {
                                  "type": "string",
                                  "minLength": 1
                                }
                              },
                              "required": [
                                "issuer_key",
                                "commitment",
                                "inclusion",
                                "receipt_id",
                                "finality",
                                "action_digest"
                              ],
                              "additionalProperties": false
                            },
                            "export_signature": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "spec",
                            "id",
                            "issued_at",
                            "issuer",
                            "opening",
                            "salt",
                            "commitment",
                            "ledger",
                            "evidence_note",
                            "verification",
                            "export_signature"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evidence_sha256": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "availability": {
                      "type": "string",
                      "enum": [
                        "sealed",
                        "pending",
                        "missing"
                      ]
                    }
                  },
                  "required": [
                    "event_id",
                    "record",
                    "record_sha256",
                    "evidence",
                    "evidence_sha256",
                    "availability"
                  ],
                  "additionalProperties": false
                },
                "maxItems": 100
              },
              "completeness": {
                "type": "object",
                "properties": {
                  "selected_event_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "sealed_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "pending_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "missing_count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "history_complete": {
                    "type": "boolean"
                  },
                  "proofs_complete": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "selected_event_count",
                  "sealed_count",
                  "pending_count",
                  "missing_count",
                  "history_complete",
                  "proofs_complete"
                ],
                "additionalProperties": false
              },
              "limits": {
                "type": "object",
                "properties": {
                  "visibility": {
                    "const": "private"
                  },
                  "independent_finality_verified": {
                    "const": false
                  },
                  "claim_execution_proven": {
                    "const": false
                  },
                  "legal_compliance_proven": {
                    "const": false
                  },
                  "case_history_independently_anchored": {
                    "const": false
                  },
                  "issuer_trust": {
                    "type": "string",
                    "minLength": 21
                  },
                  "privacy": {
                    "type": "string",
                    "minLength": 21
                  },
                  "snapshot": {
                    "type": "string",
                    "minLength": 21
                  },
                  "review": {
                    "type": "string",
                    "minLength": 21
                  },
                  "finality": {
                    "type": "string",
                    "minLength": 21
                  }
                },
                "required": [
                  "visibility",
                  "independent_finality_verified",
                  "claim_execution_proven",
                  "legal_compliance_proven",
                  "case_history_independently_anchored",
                  "issuer_trust",
                  "privacy",
                  "snapshot",
                  "review",
                  "finality"
                ],
                "additionalProperties": false
              },
              "export_signature": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "spec",
              "export_id",
              "issued_at",
              "issuer",
              "snapshot",
              "snapshot_sha256",
              "records",
              "completeness",
              "limits",
              "export_signature"
            ],
            "additionalProperties": false
          },
          "trusted_public_key_pem": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          }
        },
        "required": [
          "manifest",
          "trusted_public_key_pem"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_credential_issue",
      "response_schema": {
        "type": "object",
        "properties": {
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opkey_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "issued_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "prefix": {
                "type": "string",
                "minLength": 10,
                "maxLength": 10
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "reconcile",
                    "read",
                    "export"
                  ]
                },
                "minItems": 1,
                "maxItems": 4,
                "uniqueItems": true
              },
              "daily_event_limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked"
                ]
              },
              "effective_status": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_used_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^opkey_[a-f0-9]{24}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "usage": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "events": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "calls": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remaining_events": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "day",
                  "events",
                  "calls",
                  "remaining_events"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "issued_by",
              "label",
              "prefix",
              "scopes",
              "daily_event_limit",
              "created_at",
              "expires_at",
              "status",
              "effective_status",
              "revoked_at",
              "last_used_at",
              "rotated_from",
              "revision",
              "usage"
            ],
            "additionalProperties": false
          },
          "token": {
            "type": "string",
            "pattern": "^rso_[A-Za-z0-9_-]{43}$",
            "description": "Returned once; retain in a secret manager."
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "credential",
          "token",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "label": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ingest",
                "reconcile",
                "read",
                "export"
              ]
            },
            "minItems": 1,
            "maxItems": 4,
            "default": [
              "ingest",
              "reconcile"
            ]
          },
          "expires_in_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90,
            "default": 30
          },
          "daily_event_limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000000,
            "default": 10000
          }
        },
        "required": [
          "stream_id",
          "label"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_credential_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "credentials": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opkey_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "issued_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "label": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "prefix": {
                  "type": "string",
                  "minLength": 10,
                  "maxLength": 10
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "ingest",
                      "reconcile",
                      "read",
                      "export"
                    ]
                  },
                  "minItems": 1,
                  "maxItems": 4,
                  "uniqueItems": true
                },
                "daily_event_limit": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 1000000
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "revoked"
                  ]
                },
                "effective_status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "expired",
                    "revoked"
                  ]
                },
                "revoked_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_used_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rotated_from": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^opkey_[a-f0-9]{24}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "usage": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "remaining_events": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "day",
                    "events",
                    "calls",
                    "remaining_events"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "workspace_id",
                "stream_id",
                "issued_by",
                "label",
                "prefix",
                "scopes",
                "daily_event_limit",
                "created_at",
                "expires_at",
                "status",
                "effective_status",
                "revoked_at",
                "last_used_at",
                "rotated_from",
                "revision",
                "usage"
              ],
              "additionalProperties": false
            },
            "maxItems": 500
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "ingest",
                "reconcile",
                "read",
                "export"
              ]
            },
            "minItems": 4,
            "maxItems": 4,
            "uniqueItems": true
          }
        },
        "required": [
          "credentials",
          "scopes"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_credential_revoke",
      "response_schema": {
        "type": "object",
        "properties": {
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opkey_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "issued_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "prefix": {
                "type": "string",
                "minLength": 10,
                "maxLength": 10
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "reconcile",
                    "read",
                    "export"
                  ]
                },
                "minItems": 1,
                "maxItems": 4,
                "uniqueItems": true
              },
              "daily_event_limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked"
                ]
              },
              "effective_status": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_used_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^opkey_[a-f0-9]{24}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "usage": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "events": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "calls": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remaining_events": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "day",
                  "events",
                  "calls",
                  "remaining_events"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "issued_by",
              "label",
              "prefix",
              "scopes",
              "daily_event_limit",
              "created_at",
              "expires_at",
              "status",
              "effective_status",
              "revoked_at",
              "last_used_at",
              "rotated_from",
              "revision",
              "usage"
            ],
            "additionalProperties": false
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "credential",
          "replayed"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_credential_rotate",
      "response_schema": {
        "type": "object",
        "properties": {
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opkey_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "issued_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "prefix": {
                "type": "string",
                "minLength": 10,
                "maxLength": 10
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "reconcile",
                    "read",
                    "export"
                  ]
                },
                "minItems": 1,
                "maxItems": 4,
                "uniqueItems": true
              },
              "daily_event_limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked"
                ]
              },
              "effective_status": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_used_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^opkey_[a-f0-9]{24}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "usage": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "events": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "calls": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remaining_events": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "day",
                  "events",
                  "calls",
                  "remaining_events"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "issued_by",
              "label",
              "prefix",
              "scopes",
              "daily_event_limit",
              "created_at",
              "expires_at",
              "status",
              "effective_status",
              "revoked_at",
              "last_used_at",
              "rotated_from",
              "revision",
              "usage"
            ],
            "additionalProperties": false
          },
          "token": {
            "type": "string",
            "pattern": "^rso_[A-Za-z0-9_-]{43}$",
            "description": "Returned once; retain in a secret manager."
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "credential",
          "token",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_credential_self",
      "response_schema": {
        "type": "object",
        "properties": {
          "credential": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opkey_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "issued_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "label": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "prefix": {
                "type": "string",
                "minLength": 10,
                "maxLength": 10
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ingest",
                    "reconcile",
                    "read",
                    "export"
                  ]
                },
                "minItems": 1,
                "maxItems": 4,
                "uniqueItems": true
              },
              "daily_event_limit": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "revoked"
                ]
              },
              "effective_status": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_used_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "rotated_from": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^opkey_[a-f0-9]{24}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "usage": {
                "type": "object",
                "properties": {
                  "day": {
                    "type": "string",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "events": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "calls": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "remaining_events": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "day",
                  "events",
                  "calls",
                  "remaining_events"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "issued_by",
              "label",
              "prefix",
              "scopes",
              "daily_event_limit",
              "created_at",
              "expires_at",
              "status",
              "effective_status",
              "revoked_at",
              "last_used_at",
              "rotated_from",
              "revision",
              "usage"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "credential"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_event_batch",
      "response_schema": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "pattern": "^opb_[a-f0-9]{24}$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "atomic",
              "partial"
            ]
          },
          "accepted": {
            "type": "integer",
            "minimum": 0
          },
          "duplicates": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate"
                      ]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "client_event_id": {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "received_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "action_type": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "success",
                            "failure",
                            "unknown"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "debug",
                            "info",
                            "warning",
                            "error",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "action_sha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "maxItems": 16,
                          "uniqueItems": true
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "request_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "previous_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "event_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "ledger_seq": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "stream_id",
                        "client_event_id",
                        "sequence",
                        "occurred_at",
                        "received_at",
                        "action_type",
                        "outcome",
                        "severity",
                        "summary",
                        "action_sha256",
                        "tags",
                        "actor_tenant_id",
                        "request_hash",
                        "previous_hash",
                        "event_hash",
                        "ledger_seq"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "event"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "const": "rejected"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "operations_invalid",
                            "operations_forbidden",
                            "operations_not_found",
                            "operations_conflict",
                            "operations_limit",
                            "operations_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "integer",
                          "minimum": 400,
                          "maximum": 599
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "error"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "batch_id",
          "mode",
          "accepted",
          "duplicates",
          "rejected",
          "results",
          "replayed"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16
                }
              },
              "required": [
                "client_event_id",
                "action_type"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100
          },
          "mode": {
            "type": "string",
            "enum": [
              "atomic",
              "partial"
            ],
            "default": "partial"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
          }
        },
        "required": [
          "events"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_event_export",
      "response_schema": {
        "type": "object",
        "properties": {
          "spec": {
            "const": "rs-activity-evidence/1"
          },
          "id": {
            "type": "string",
            "pattern": "^act_[a-f0-9]{20}$"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "issuer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "key_id": {
                "type": "string",
                "minLength": 1
              },
              "public_key_pem": {
                "type": "string",
                "minLength": 1
              },
              "block_key_status": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "current",
                      "retired",
                      "revoked",
                      "unknown"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "key_id",
              "public_key_pem",
              "block_key_status"
            ],
            "additionalProperties": false
          },
          "opening": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "salt": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "ledger": {
            "type": "object",
            "properties": {
              "entry": {
                "type": "object",
                "properties": {
                  "seq": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "type": {
                    "const": "activity.receipt"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "payload": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "texts": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "salt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "redacted_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "salt",
                        "redacted_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "data": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "payload_hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "leaf_hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "block_height": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "seq",
                  "at",
                  "type",
                  "subject",
                  "payload",
                  "texts",
                  "data",
                  "payload_hash",
                  "leaf_hash",
                  "block_height"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sealed"
                ]
              },
              "block": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "v": {
                        "const": 1
                      },
                      "height": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "prev_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "merkle_root": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "first_seq": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "last_seq": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "entry_count": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "key_id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "block_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "signature": {
                        "type": "string",
                        "minLength": 1
                      },
                      "public_key_pem": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "v",
                      "height",
                      "prev_hash",
                      "merkle_root",
                      "first_seq",
                      "last_seq",
                      "entry_count",
                      "at",
                      "key_id",
                      "block_hash",
                      "signature",
                      "public_key_pem"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "proof": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "leaf_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "path": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "side": {
                              "type": "string",
                              "enum": [
                                "L",
                                "R"
                              ]
                            },
                            "hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "side",
                            "hash"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "merkle_root": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "how_to_verify": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "leaf_hash",
                      "index",
                      "path",
                      "merkle_root",
                      "how_to_verify"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "entry",
              "status",
              "block",
              "proof"
            ],
            "additionalProperties": false
          },
          "evidence_note": {
            "type": "string",
            "minLength": 1
          },
          "verification": {
            "type": "object",
            "properties": {
              "issuer_key": {
                "type": "string",
                "minLength": 1
              },
              "commitment": {
                "type": "string",
                "minLength": 1
              },
              "inclusion": {
                "type": "string",
                "minLength": 1
              },
              "receipt_id": {
                "type": "string",
                "minLength": 1
              },
              "finality": {
                "type": "string",
                "minLength": 1
              },
              "action_digest": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "issuer_key",
              "commitment",
              "inclusion",
              "receipt_id",
              "finality",
              "action_digest"
            ],
            "additionalProperties": false
          },
          "export_signature": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "spec",
          "id",
          "issued_at",
          "issuer",
          "opening",
          "salt",
          "commitment",
          "ledger",
          "evidence_note",
          "verification",
          "export_signature"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_event_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[a-f0-9]{20}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "client_event_id": {
                "type": "string",
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "received_at": {
                "type": "string",
                "format": "date-time"
              },
              "action_type": {
                "type": "string",
                "maxLength": 96,
                "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "success",
                  "failure",
                  "unknown"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "summary": {
                "type": "string",
                "maxLength": 2048
              },
              "action_sha256": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "maxItems": 16,
                "uniqueItems": true
              },
              "actor_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "request_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "previous_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "event_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "ledger_seq": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "client_event_id",
              "sequence",
              "occurred_at",
              "received_at",
              "action_type",
              "outcome",
              "severity",
              "summary",
              "action_sha256",
              "tags",
              "actor_tenant_id",
              "request_hash",
              "previous_hash",
              "event_hash",
              "ledger_seq"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "event"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_event_ingest",
      "response_schema": {
        "type": "object",
        "properties": {
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[a-f0-9]{20}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "client_event_id": {
                "type": "string",
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "received_at": {
                "type": "string",
                "format": "date-time"
              },
              "action_type": {
                "type": "string",
                "maxLength": 96,
                "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "success",
                  "failure",
                  "unknown"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "summary": {
                "type": "string",
                "maxLength": 2048
              },
              "action_sha256": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "maxItems": 16,
                "uniqueItems": true
              },
              "actor_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "request_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "previous_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "event_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "ledger_seq": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "client_event_id",
              "sequence",
              "occurred_at",
              "received_at",
              "action_type",
              "outcome",
              "severity",
              "summary",
              "action_sha256",
              "tags",
              "actor_tenant_id",
              "request_hash",
              "previous_hash",
              "event_hash",
              "ledger_seq"
            ],
            "additionalProperties": false
          },
          "duplicate": {
            "type": "boolean"
          }
        },
        "required": [
          "event",
          "duplicate"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "client_event_id": {
            "type": "string",
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
          },
          "action_type": {
            "type": "string",
            "maxLength": 96,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "success",
              "failure",
              "unknown"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "debug",
              "info",
              "warning",
              "error",
              "critical"
            ]
          },
          "summary": {
            "type": "string",
            "maxLength": 2048
          },
          "action_sha256": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-fA-F0-9]{64}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "maxItems": 16
          }
        },
        "required": [
          "client_event_id",
          "action_type"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_event_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "received_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16,
                  "uniqueItems": true
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "request_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "previous_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "event_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "ledger_seq": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "stream_id",
                "client_event_id",
                "sequence",
                "occurred_at",
                "received_at",
                "action_type",
                "outcome",
                "severity",
                "summary",
                "action_sha256",
                "tags",
                "actor_tenant_id",
                "request_hash",
                "previous_hash",
                "event_hash",
                "ledger_seq"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "order": {
            "const": "sequence_desc"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "time_filter": {
            "const": "occurred_at"
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "events",
          "next_cursor",
          "snapshot_sequence",
          "order",
          "limit",
          "time_filter",
          "note"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_event_reconcile",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "recorded",
                        "conflict"
                      ]
                    },
                    "content_matches": {
                      "type": "boolean"
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status",
                    "event_id",
                    "sequence",
                    "event_hash",
                    "request_hash",
                    "received_at",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "const": "missing"
                    },
                    "content_matches": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "recorded": {
            "type": "integer",
            "minimum": 0
          },
          "missing": {
            "type": "integer",
            "minimum": 0
          },
          "conflicts": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "stream_id",
          "results",
          "recorded",
          "missing",
          "conflicts"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "client_event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
            },
            "minItems": 1,
            "maxItems": 100
          },
          "expected_events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16
                }
              },
              "required": [
                "client_event_id",
                "action_type"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "One event for each client_event_id, in the same order, with the matching key. Presence alone does not establish content equivalence."
          }
        },
        "required": [
          "client_event_ids"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_event_reconcile_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "recorded",
                        "conflict"
                      ]
                    },
                    "content_matches": {
                      "type": "boolean"
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status",
                    "event_id",
                    "sequence",
                    "event_hash",
                    "request_hash",
                    "received_at",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "const": "missing"
                    },
                    "content_matches": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "recorded": {
            "type": "integer",
            "minimum": 0
          },
          "missing": {
            "type": "integer",
            "minimum": 0
          },
          "conflicts": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "stream_id",
          "results",
          "recorded",
          "missing",
          "conflicts"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_exception_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "exception": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opex_[a-f0-9]{24}$"
              },
              "cursor": {
                "type": "integer",
                "minimum": 1
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "policy_id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "policy_version": {
                "type": "integer",
                "minimum": 1
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "rule": {
                "type": "string",
                "enum": [
                  "action_type",
                  "failure",
                  "severity",
                  "action_digest",
                  "arrival_delay",
                  "sequence_gap",
                  "digest_chain",
                  "volume_low",
                  "volume_high",
                  "failure_rate",
                  "stream_stale"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "evidence": {
                "type": "object",
                "properties": {
                  "event_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "maxItems": 20
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "event_id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "action_sha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ledger_seq": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "event_id",
                        "stream_id",
                        "sequence",
                        "event_hash",
                        "action_sha256",
                        "ledger_seq"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 20
                  },
                  "first_sequence": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_sequence": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "window_start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "window_end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "observed": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "expected": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "evidence_truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "event_ids",
                  "events",
                  "first_sequence",
                  "last_sequence",
                  "observed",
                  "expected",
                  "evidence_truncated"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "acknowledged",
                  "resolved"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "assignee_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "opened_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "resolved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "cursor",
              "workspace_id",
              "policy_id",
              "policy_version",
              "stream_id",
              "rule",
              "severity",
              "message",
              "evidence",
              "status",
              "version",
              "assignee_tenant_id",
              "opened_at",
              "updated_at",
              "resolved_at",
              "notice"
            ],
            "additionalProperties": false
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "exception_id": {
                  "type": "string",
                  "pattern": "^opex_[a-f0-9]{24}$"
                },
                "from_status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "open",
                        "acknowledged",
                        "resolved"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                  ]
                },
                "from_assignee_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_assignee_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "reason": {
                  "type": "string",
                  "minLength": 1
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "exception_id",
                "from_status",
                "to_status",
                "from_assignee_tenant_id",
                "to_assignee_tenant_id",
                "version",
                "actor_tenant_id",
                "reason",
                "at"
              ],
              "additionalProperties": false
            }
          },
          "next_before": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "exception",
          "history",
          "next_before",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_exception_transition",
      "response_schema": {
        "type": "object",
        "properties": {
          "exception": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opex_[a-f0-9]{24}$"
              },
              "cursor": {
                "type": "integer",
                "minimum": 1
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "policy_id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "policy_version": {
                "type": "integer",
                "minimum": 1
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "rule": {
                "type": "string",
                "enum": [
                  "action_type",
                  "failure",
                  "severity",
                  "action_digest",
                  "arrival_delay",
                  "sequence_gap",
                  "digest_chain",
                  "volume_low",
                  "volume_high",
                  "failure_rate",
                  "stream_stale"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "message": {
                "type": "string",
                "minLength": 1
              },
              "evidence": {
                "type": "object",
                "properties": {
                  "event_ids": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "maxItems": 20
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "event_id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "event_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "action_sha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "ledger_seq": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "event_id",
                        "stream_id",
                        "sequence",
                        "event_hash",
                        "action_sha256",
                        "ledger_seq"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 20
                  },
                  "first_sequence": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_sequence": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "window_start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "window_end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "observed": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "expected": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "evidence_truncated": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "event_ids",
                  "events",
                  "first_sequence",
                  "last_sequence",
                  "observed",
                  "expected",
                  "evidence_truncated"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "open",
                  "acknowledged",
                  "resolved"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "assignee_tenant_id": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "opened_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "resolved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "cursor",
              "workspace_id",
              "policy_id",
              "policy_version",
              "stream_id",
              "rule",
              "severity",
              "message",
              "evidence",
              "status",
              "version",
              "assignee_tenant_id",
              "opened_at",
              "updated_at",
              "resolved_at",
              "notice"
            ],
            "additionalProperties": false
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "minimum": 1
                },
                "exception_id": {
                  "type": "string",
                  "pattern": "^opex_[a-f0-9]{24}$"
                },
                "from_status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "open",
                        "acknowledged",
                        "resolved"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                  ]
                },
                "from_assignee_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "to_assignee_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "reason": {
                  "type": "string",
                  "minLength": 1
                },
                "at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "id",
                "exception_id",
                "from_status",
                "to_status",
                "from_assignee_tenant_id",
                "to_assignee_tenant_id",
                "version",
                "actor_tenant_id",
                "reason",
                "at"
              ],
              "additionalProperties": false
            }
          },
          "next_before": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "exception",
          "history",
          "next_before",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483646
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "acknowledged",
              "resolved"
            ]
          },
          "reason": {
            "type": "string",
            "minLength": 1,
            "maxLength": 4000
          },
          "assignee_tenant_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "expected_version",
          "status",
          "reason"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_exceptions_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "exceptions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opex_[a-f0-9]{24}$"
                },
                "cursor": {
                  "type": "integer",
                  "minimum": 1
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "policy_id": {
                  "type": "string",
                  "pattern": "^oppol_[a-f0-9]{24}$"
                },
                "policy_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "rule": {
                  "type": "string",
                  "enum": [
                    "action_type",
                    "failure",
                    "severity",
                    "action_digest",
                    "arrival_delay",
                    "sequence_gap",
                    "digest_chain",
                    "volume_low",
                    "volume_high",
                    "failure_rate",
                    "stream_stale"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "evidence": {
                  "type": "object",
                  "properties": {
                    "event_ids": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "pattern": "^act_[a-f0-9]{20}$"
                      },
                      "maxItems": 20
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "event_id": {
                            "type": "string",
                            "pattern": "^act_[a-f0-9]{20}$"
                          },
                          "stream_id": {
                            "type": "string",
                            "pattern": "^opst_[a-f0-9]{24}$"
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "event_hash": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "action_sha256": {
                            "anyOf": [
                              {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "ledger_seq": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 1
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "event_id",
                          "stream_id",
                          "sequence",
                          "event_hash",
                          "action_sha256",
                          "ledger_seq"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 20
                    },
                    "first_sequence": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_sequence": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "window_start": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "window_end": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "observed": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "expected": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    "evidence_truncated": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "event_ids",
                    "events",
                    "first_sequence",
                    "last_sequence",
                    "observed",
                    "expected",
                    "evidence_truncated"
                  ],
                  "additionalProperties": false
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "assignee_tenant_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "opened_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "resolved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notice": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "cursor",
                "workspace_id",
                "policy_id",
                "policy_version",
                "stream_id",
                "rule",
                "severity",
                "message",
                "evidence",
                "status",
                "version",
                "assignee_tenant_id",
                "opened_at",
                "updated_at",
                "resolved_at",
                "notice"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "summary": {
            "type": "object",
            "properties": {
              "open": {
                "type": "integer",
                "minimum": 0
              },
              "acknowledged": {
                "type": "integer",
                "minimum": 0
              },
              "resolved": {
                "type": "integer",
                "minimum": 0
              },
              "total": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "open",
              "acknowledged",
              "resolved",
              "total"
            ],
            "additionalProperties": false
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "exceptions",
          "summary",
          "next_cursor",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_health",
      "response_schema": {
        "type": "object",
        "properties": {
          "health": {
            "type": "object",
            "properties": {
              "as_of": {
                "type": "string",
                "format": "date-time"
              },
              "window_start": {
                "type": "string",
                "format": "date-time"
              },
              "window_end": {
                "type": "string",
                "format": "date-time"
              },
              "window_seconds": {
                "type": "integer",
                "minimum": 60,
                "maximum": 2592000
              },
              "streams": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "stream_id": {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "active",
                        "paused",
                        "archived"
                      ]
                    },
                    "has_events": {
                      "type": "boolean"
                    },
                    "last_event_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_sequence": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_received_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "last_occurred_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "silent_seconds": {
                      "type": "number",
                      "minimum": 0
                    },
                    "stale": {
                      "type": "boolean"
                    },
                    "stale_after_seconds": {
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 2592000
                    },
                    "event_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "success_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failure_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "unknown_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "known_outcome_count": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "failure_rate": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "events_per_minute": {
                      "type": "number",
                      "minimum": 0
                    },
                    "pending_commitments": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "commitment_mode": {
                      "type": "string",
                      "enum": [
                        "private_only",
                        "public_digest_only"
                      ]
                    }
                  },
                  "required": [
                    "stream_id",
                    "name",
                    "status",
                    "has_events",
                    "last_event_id",
                    "last_sequence",
                    "last_received_at",
                    "last_occurred_at",
                    "silent_seconds",
                    "stale",
                    "stale_after_seconds",
                    "event_count",
                    "success_count",
                    "failure_count",
                    "unknown_count",
                    "known_outcome_count",
                    "failure_rate",
                    "events_per_minute",
                    "pending_commitments",
                    "commitment_mode"
                  ],
                  "additionalProperties": false
                }
              },
              "streams_truncated": {
                "type": "boolean"
              },
              "totals": {
                "type": "object",
                "properties": {
                  "event_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "success_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failure_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "unknown_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "known_outcome_count": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "failure_rate": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "events_per_minute": {
                    "type": "number",
                    "minimum": 0
                  },
                  "pending_commitments": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "event_count",
                  "success_count",
                  "failure_count",
                  "unknown_count",
                  "known_outcome_count",
                  "failure_rate",
                  "events_per_minute",
                  "pending_commitments"
                ],
                "additionalProperties": false
              },
              "policy_backlog": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "policy_id": {
                      "type": "string",
                      "pattern": "^oppol_[a-f0-9]{24}$"
                    },
                    "policy_version": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "enabled",
                        "paused"
                      ]
                    },
                    "last_sequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "last_evaluated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evaluated_through": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "pending_events": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "next_window_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "policy_id",
                    "policy_version",
                    "status",
                    "last_sequence",
                    "last_evaluated_at",
                    "evaluated_through",
                    "pending_events",
                    "next_window_at"
                  ],
                  "additionalProperties": false
                }
              },
              "exceptions": {
                "type": "object",
                "properties": {
                  "open": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "acknowledged": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "resolved": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "open",
                  "acknowledged",
                  "resolved",
                  "total"
                ],
                "additionalProperties": false
              },
              "evaluation_mode": {
                "const": "explicit"
              },
              "notification_mode": {
                "const": "queue_only"
              },
              "measurement": {
                "type": "string",
                "minLength": 1
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "as_of",
              "window_start",
              "window_end",
              "window_seconds",
              "streams",
              "streams_truncated",
              "totals",
              "policy_backlog",
              "exceptions",
              "evaluation_mode",
              "notification_mode",
              "measurement",
              "notice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "health"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_invite_accept",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          },
          "invite": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opi_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "target_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "cancelled",
                  "expired"
                ]
              },
              "invited_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "resolved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "accepted_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "target_tenant_id",
              "role",
              "status",
              "invited_by",
              "created_at",
              "expires_at",
              "resolved_at",
              "accepted_by"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private",
          "invite"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "pattern": "^opi_token_[A-Za-z0-9_-]{43}$"
          }
        },
        "required": [
          "token"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_invite_cancel",
      "response_schema": {
        "type": "object",
        "properties": {
          "invite": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opi_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "target_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "cancelled",
                  "expired"
                ]
              },
              "invited_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "resolved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "accepted_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "target_tenant_id",
              "role",
              "status",
              "invited_by",
              "created_at",
              "expires_at",
              "resolved_at",
              "accepted_by"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "invite",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_invite_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "invite": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opi_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "target_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "accepted",
                  "cancelled",
                  "expired"
                ]
              },
              "invited_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "resolved_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "accepted_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "target_tenant_id",
              "role",
              "status",
              "invited_by",
              "created_at",
              "expires_at",
              "resolved_at",
              "accepted_by"
            ],
            "additionalProperties": false
          },
          "token": {
            "type": "string",
            "pattern": "^opi_token_[A-Za-z0-9_-]{43}$",
            "description": "Returned once; share privately with the intended account."
          },
          "token_shown_once": {
            "const": true
          },
          "delivery": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "invite",
          "token",
          "token_shown_once",
          "delivery",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "target_tenant_id": {
            "type": "string",
            "pattern": "^ten_[a-f0-9]{20}$"
          },
          "role": {
            "type": "string",
            "enum": [
              "admin",
              "operator",
              "reviewer",
              "viewer"
            ]
          },
          "expires_in_hours": {
            "type": "integer",
            "minimum": 1,
            "maximum": 168,
            "default": 48
          }
        },
        "required": [
          "target_tenant_id",
          "role"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_invite_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "invites": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opi_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "target_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "admin",
                    "operator",
                    "reviewer",
                    "viewer"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "accepted",
                    "cancelled",
                    "expired"
                  ]
                },
                "invited_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "resolved_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "accepted_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "target_tenant_id",
                "role",
                "status",
                "invited_by",
                "created_at",
                "expires_at",
                "resolved_at",
                "accepted_by"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "invites",
          "next_cursor",
          "limit",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_member_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "members": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "admin",
                    "operator",
                    "reviewer",
                    "viewer"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "removed"
                  ]
                },
                "added_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "joined_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "removed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "display_name": {
                  "type": "string"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "read",
                      "write",
                      "review",
                      "manage",
                      "admin"
                    ]
                  }
                }
              },
              "required": [
                "workspace_id",
                "tenant_id",
                "role",
                "status",
                "added_by",
                "joined_at",
                "updated_at",
                "removed_at",
                "display_name",
                "capabilities"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "members",
          "next_cursor",
          "limit",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_member_remove",
      "response_schema": {
        "type": "object",
        "properties": {
          "removed": {
            "const": true
          },
          "tenant_id": {
            "type": "string",
            "pattern": "^ten_[a-f0-9]{20}$"
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "removed",
          "tenant_id",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_member_role",
      "response_schema": {
        "type": "object",
        "properties": {
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "member",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "operator",
              "reviewer",
              "viewer"
            ]
          }
        },
        "required": [
          "role"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_policies_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "policies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^oppol_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "enabled",
                    "paused"
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "rules": {
                  "type": "object",
                  "properties": {
                    "allowed_action_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 96,
                        "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                      },
                      "minItems": 1,
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "alert_on_failure": {
                      "type": "boolean"
                    },
                    "min_severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "require_action_sha256": {
                      "type": "boolean"
                    },
                    "max_arrival_delay_seconds": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2592000
                    },
                    "require_sequence_continuity": {
                      "type": "boolean"
                    },
                    "require_digest_chain": {
                      "type": "boolean"
                    },
                    "stale_after_seconds": {
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 2592000
                    },
                    "window": {
                      "type": "object",
                      "properties": {
                        "seconds": {
                          "type": "integer",
                          "minimum": 60,
                          "maximum": 86400
                        },
                        "min_events": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "max_events": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000000
                        },
                        "max_failure_rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "min_samples": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000000
                        }
                      },
                      "required": [
                        "seconds"
                      ],
                      "additionalProperties": false,
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "required": [
                                "min_events"
                              ]
                            },
                            {
                              "required": [
                                "max_events"
                              ]
                            },
                            {
                              "required": [
                                "max_failure_rate"
                              ]
                            }
                          ]
                        },
                        {
                          "if": {
                            "required": [
                              "min_samples"
                            ]
                          },
                          "then": {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        }
                      ],
                      "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                    }
                  },
                  "additionalProperties": false,
                  "anyOf": [
                    {
                      "required": [
                        "allowed_action_types"
                      ]
                    },
                    {
                      "required": [
                        "min_severity"
                      ]
                    },
                    {
                      "required": [
                        "max_arrival_delay_seconds"
                      ]
                    },
                    {
                      "required": [
                        "stale_after_seconds"
                      ]
                    },
                    {
                      "required": [
                        "window"
                      ]
                    },
                    {
                      "required": [
                        "alert_on_failure"
                      ],
                      "properties": {
                        "alert_on_failure": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_action_sha256"
                      ],
                      "properties": {
                        "require_action_sha256": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_sequence_continuity"
                      ],
                      "properties": {
                        "require_sequence_continuity": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_digest_chain"
                      ],
                      "properties": {
                        "require_digest_chain": {
                          "const": true
                        }
                      }
                    }
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "checkpoint": {
                  "type": "object",
                  "properties": {
                    "last_sequence": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "last_evaluated_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "evaluated_through": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "next_window_at": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "date-time"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "last_sequence",
                    "last_evaluated_at",
                    "evaluated_through",
                    "next_window_at"
                  ],
                  "additionalProperties": false
                },
                "notice": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "workspace_id",
                "stream_id",
                "name",
                "description",
                "status",
                "version",
                "rules",
                "created_by",
                "created_at",
                "updated_at",
                "checkpoint",
                "notice"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "limits": {
            "type": "object",
            "properties": {
              "policies_per_workspace": {
                "const": 200
              },
              "rules_action_types": {
                "const": 100
              },
              "events_per_evaluation": {
                "const": 1000
              },
              "windows_per_evaluation": {
                "const": 100
              },
              "evidence_events": {
                "const": 20
              },
              "list_page": {
                "const": 100
              }
            },
            "required": [
              "policies_per_workspace",
              "rules_action_types",
              "events_per_evaluation",
              "windows_per_evaluation",
              "evidence_events",
              "list_page"
            ],
            "additionalProperties": false
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "policies",
          "limits",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_policy_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "policy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "type": "string",
                "enum": [
                  "enabled",
                  "paused"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "rules": {
                "type": "object",
                "properties": {
                  "allowed_action_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "alert_on_failure": {
                    "type": "boolean"
                  },
                  "min_severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "max_arrival_delay_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2592000
                  },
                  "require_sequence_continuity": {
                    "type": "boolean"
                  },
                  "require_digest_chain": {
                    "type": "boolean"
                  },
                  "stale_after_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "seconds": {
                        "type": "integer",
                        "minimum": 60,
                        "maximum": 86400
                      },
                      "min_events": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      "max_events": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      "max_failure_rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "min_samples": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "seconds"
                    ],
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "required": [
                              "min_events"
                            ]
                          },
                          {
                            "required": [
                              "max_events"
                            ]
                          },
                          {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        ]
                      },
                      {
                        "if": {
                          "required": [
                            "min_samples"
                          ]
                        },
                        "then": {
                          "required": [
                            "max_failure_rate"
                          ]
                        }
                      }
                    ],
                    "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "allowed_action_types"
                    ]
                  },
                  {
                    "required": [
                      "min_severity"
                    ]
                  },
                  {
                    "required": [
                      "max_arrival_delay_seconds"
                    ]
                  },
                  {
                    "required": [
                      "stale_after_seconds"
                    ]
                  },
                  {
                    "required": [
                      "window"
                    ]
                  },
                  {
                    "required": [
                      "alert_on_failure"
                    ],
                    "properties": {
                      "alert_on_failure": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_action_sha256"
                    ],
                    "properties": {
                      "require_action_sha256": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_sequence_continuity"
                    ],
                    "properties": {
                      "require_sequence_continuity": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_digest_chain"
                    ],
                    "properties": {
                      "require_digest_chain": {
                        "const": true
                      }
                    }
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "checkpoint": {
                "type": "object",
                "properties": {
                  "last_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "last_evaluated_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluated_through": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "next_window_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "last_sequence",
                  "last_evaluated_at",
                  "evaluated_through",
                  "next_window_at"
                ],
                "additionalProperties": false
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "name",
              "description",
              "status",
              "version",
              "rules",
              "created_by",
              "created_at",
              "updated_at",
              "checkpoint",
              "notice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "policy"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "paused"
            ],
            "default": "enabled"
          },
          "rules": {
            "type": "object",
            "properties": {
              "allowed_action_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "minItems": 1,
                "maxItems": 100,
                "uniqueItems": true
              },
              "alert_on_failure": {
                "type": "boolean"
              },
              "min_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "require_action_sha256": {
                "type": "boolean"
              },
              "max_arrival_delay_seconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2592000
              },
              "require_sequence_continuity": {
                "type": "boolean"
              },
              "require_digest_chain": {
                "type": "boolean"
              },
              "stale_after_seconds": {
                "type": "integer",
                "minimum": 60,
                "maximum": 2592000
              },
              "window": {
                "type": "object",
                "properties": {
                  "seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400
                  },
                  "min_events": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_failure_rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "min_samples": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  }
                },
                "required": [
                  "seconds"
                ],
                "additionalProperties": false,
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "required": [
                          "min_events"
                        ]
                      },
                      {
                        "required": [
                          "max_events"
                        ]
                      },
                      {
                        "required": [
                          "max_failure_rate"
                        ]
                      }
                    ]
                  },
                  {
                    "if": {
                      "required": [
                        "min_samples"
                      ]
                    },
                    "then": {
                      "required": [
                        "max_failure_rate"
                      ]
                    }
                  }
                ],
                "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "allowed_action_types"
                ]
              },
              {
                "required": [
                  "min_severity"
                ]
              },
              {
                "required": [
                  "max_arrival_delay_seconds"
                ]
              },
              {
                "required": [
                  "stale_after_seconds"
                ]
              },
              {
                "required": [
                  "window"
                ]
              },
              {
                "required": [
                  "alert_on_failure"
                ],
                "properties": {
                  "alert_on_failure": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_action_sha256"
                ],
                "properties": {
                  "require_action_sha256": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_sequence_continuity"
                ],
                "properties": {
                  "require_sequence_continuity": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_digest_chain"
                ],
                "properties": {
                  "require_digest_chain": {
                    "const": true
                  }
                }
              }
            ]
          }
        },
        "required": [
          "stream_id",
          "name",
          "rules"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_policy_evaluate",
      "response_schema": {
        "type": "object",
        "properties": {
          "evaluation": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opeval_[a-f0-9]{24}$"
              },
              "policy_id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "policy_version": {
                "type": "integer",
                "minimum": 1
              },
              "through": {
                "type": "string",
                "format": "date-time"
              },
              "events_scanned": {
                "type": "integer",
                "minimum": 0
              },
              "windows_evaluated": {
                "type": "integer",
                "minimum": 0
              },
              "exceptions_created": {
                "type": "integer",
                "minimum": 0
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              },
              "has_more": {
                "type": "boolean"
              },
              "next_window_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "policy_id",
              "policy_version",
              "through",
              "events_scanned",
              "windows_evaluated",
              "exceptions_created",
              "last_sequence",
              "has_more",
              "next_window_at",
              "notice"
            ],
            "additionalProperties": false
          },
          "policy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "type": "string",
                "enum": [
                  "enabled",
                  "paused"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "rules": {
                "type": "object",
                "properties": {
                  "allowed_action_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "alert_on_failure": {
                    "type": "boolean"
                  },
                  "min_severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "max_arrival_delay_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2592000
                  },
                  "require_sequence_continuity": {
                    "type": "boolean"
                  },
                  "require_digest_chain": {
                    "type": "boolean"
                  },
                  "stale_after_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "seconds": {
                        "type": "integer",
                        "minimum": 60,
                        "maximum": 86400
                      },
                      "min_events": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      "max_events": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      "max_failure_rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "min_samples": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "seconds"
                    ],
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "required": [
                              "min_events"
                            ]
                          },
                          {
                            "required": [
                              "max_events"
                            ]
                          },
                          {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        ]
                      },
                      {
                        "if": {
                          "required": [
                            "min_samples"
                          ]
                        },
                        "then": {
                          "required": [
                            "max_failure_rate"
                          ]
                        }
                      }
                    ],
                    "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "allowed_action_types"
                    ]
                  },
                  {
                    "required": [
                      "min_severity"
                    ]
                  },
                  {
                    "required": [
                      "max_arrival_delay_seconds"
                    ]
                  },
                  {
                    "required": [
                      "stale_after_seconds"
                    ]
                  },
                  {
                    "required": [
                      "window"
                    ]
                  },
                  {
                    "required": [
                      "alert_on_failure"
                    ],
                    "properties": {
                      "alert_on_failure": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_action_sha256"
                    ],
                    "properties": {
                      "require_action_sha256": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_sequence_continuity"
                    ],
                    "properties": {
                      "require_sequence_continuity": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_digest_chain"
                    ],
                    "properties": {
                      "require_digest_chain": {
                        "const": true
                      }
                    }
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "checkpoint": {
                "type": "object",
                "properties": {
                  "last_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "last_evaluated_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluated_through": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "next_window_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "last_sequence",
                  "last_evaluated_at",
                  "evaluated_through",
                  "next_window_at"
                ],
                "additionalProperties": false
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "name",
              "description",
              "status",
              "version",
              "rules",
              "created_by",
              "created_at",
              "updated_at",
              "checkpoint",
              "notice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "evaluation",
          "policy"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "through": {
            "type": "string",
            "format": "date-time"
          },
          "max_events": {
            "type": "integer",
            "minimum": 1,
            "maximum": 1000,
            "default": 250
          },
          "max_windows": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100,
            "default": 24
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_policy_evaluations",
      "response_schema": {
        "type": "object",
        "properties": {
          "evaluations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cursor": {
                  "type": "integer",
                  "minimum": 1
                },
                "id": {
                  "type": "string",
                  "pattern": "^opeval_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "policy_id": {
                  "type": "string",
                  "pattern": "^oppol_[a-f0-9]{24}$"
                },
                "policy_version": {
                  "type": "integer",
                  "minimum": 1
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "evaluated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "through": {
                  "type": "string",
                  "format": "date-time"
                },
                "events_scanned": {
                  "type": "integer",
                  "minimum": 0
                },
                "windows_evaluated": {
                  "type": "integer",
                  "minimum": 0
                },
                "exceptions_created": {
                  "type": "integer",
                  "minimum": 0
                },
                "last_sequence": {
                  "type": "integer",
                  "minimum": 0
                },
                "has_more": {
                  "type": "boolean"
                }
              },
              "required": [
                "cursor",
                "id",
                "workspace_id",
                "policy_id",
                "policy_version",
                "actor_tenant_id",
                "evaluated_at",
                "through",
                "events_scanned",
                "windows_evaluated",
                "exceptions_created",
                "last_sequence",
                "has_more"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "evaluations",
          "next_cursor",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_policy_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "policy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "type": "string",
                "enum": [
                  "enabled",
                  "paused"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "rules": {
                "type": "object",
                "properties": {
                  "allowed_action_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "alert_on_failure": {
                    "type": "boolean"
                  },
                  "min_severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "max_arrival_delay_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2592000
                  },
                  "require_sequence_continuity": {
                    "type": "boolean"
                  },
                  "require_digest_chain": {
                    "type": "boolean"
                  },
                  "stale_after_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "seconds": {
                        "type": "integer",
                        "minimum": 60,
                        "maximum": 86400
                      },
                      "min_events": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      "max_events": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      "max_failure_rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "min_samples": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "seconds"
                    ],
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "required": [
                              "min_events"
                            ]
                          },
                          {
                            "required": [
                              "max_events"
                            ]
                          },
                          {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        ]
                      },
                      {
                        "if": {
                          "required": [
                            "min_samples"
                          ]
                        },
                        "then": {
                          "required": [
                            "max_failure_rate"
                          ]
                        }
                      }
                    ],
                    "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "allowed_action_types"
                    ]
                  },
                  {
                    "required": [
                      "min_severity"
                    ]
                  },
                  {
                    "required": [
                      "max_arrival_delay_seconds"
                    ]
                  },
                  {
                    "required": [
                      "stale_after_seconds"
                    ]
                  },
                  {
                    "required": [
                      "window"
                    ]
                  },
                  {
                    "required": [
                      "alert_on_failure"
                    ],
                    "properties": {
                      "alert_on_failure": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_action_sha256"
                    ],
                    "properties": {
                      "require_action_sha256": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_sequence_continuity"
                    ],
                    "properties": {
                      "require_sequence_continuity": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_digest_chain"
                    ],
                    "properties": {
                      "require_digest_chain": {
                        "const": true
                      }
                    }
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "checkpoint": {
                "type": "object",
                "properties": {
                  "last_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "last_evaluated_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluated_through": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "next_window_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "last_sequence",
                  "last_evaluated_at",
                  "evaluated_through",
                  "next_window_at"
                ],
                "additionalProperties": false
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "name",
              "description",
              "status",
              "version",
              "rules",
              "created_by",
              "created_at",
              "updated_at",
              "checkpoint",
              "notice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "policy"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_policy_schedule_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "schedule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string",
                    "pattern": "^oppol_[a-f0-9]{24}$"
                  },
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^opw_[a-f0-9]{24}$"
                  },
                  "interval_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 1440
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "status_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actor_tenant_id": {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  "next_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_outcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "evaluated",
                          "caught_up",
                          "failed"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_evaluation_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "consecutive_failures": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "runs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "policy_id",
                  "workspace_id",
                  "interval_minutes",
                  "status",
                  "status_reason",
                  "actor_tenant_id",
                  "next_run_at",
                  "last_run_at",
                  "last_outcome",
                  "last_error",
                  "last_evaluation_id",
                  "consecutive_failures",
                  "runs",
                  "created_at",
                  "updated_at",
                  "revision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "schedule",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_policy_schedule_set",
      "response_schema": {
        "type": "object",
        "properties": {
          "schedule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "policy_id": {
                    "type": "string",
                    "pattern": "^oppol_[a-f0-9]{24}$"
                  },
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^opw_[a-f0-9]{24}$"
                  },
                  "interval_minutes": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 1440
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "status_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actor_tenant_id": {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  "next_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_outcome": {
                    "anyOf": [
                      {
                        "type": "string",
                        "enum": [
                          "evaluated",
                          "caught_up",
                          "failed"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_evaluation_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "minLength": 1
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "consecutive_failures": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "runs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "policy_id",
                  "workspace_id",
                  "interval_minutes",
                  "status",
                  "status_reason",
                  "actor_tenant_id",
                  "next_run_at",
                  "last_run_at",
                  "last_outcome",
                  "last_error",
                  "last_evaluation_id",
                  "consecutive_failures",
                  "runs",
                  "created_at",
                  "updated_at",
                  "revision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "schedule",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "interval_minutes": {
            "type": "integer",
            "minimum": 5,
            "maximum": 1440,
            "default": 60
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ],
            "default": "active"
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_policy_update",
      "response_schema": {
        "type": "object",
        "properties": {
          "policy": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^oppol_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "status": {
                "type": "string",
                "enum": [
                  "enabled",
                  "paused"
                ]
              },
              "version": {
                "type": "integer",
                "minimum": 1
              },
              "rules": {
                "type": "object",
                "properties": {
                  "allowed_action_types": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 100,
                    "uniqueItems": true
                  },
                  "alert_on_failure": {
                    "type": "boolean"
                  },
                  "min_severity": {
                    "type": "string",
                    "enum": [
                      "debug",
                      "info",
                      "warning",
                      "error",
                      "critical"
                    ]
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "max_arrival_delay_seconds": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 2592000
                  },
                  "require_sequence_continuity": {
                    "type": "boolean"
                  },
                  "require_digest_chain": {
                    "type": "boolean"
                  },
                  "stale_after_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 2592000
                  },
                  "window": {
                    "type": "object",
                    "properties": {
                      "seconds": {
                        "type": "integer",
                        "minimum": 60,
                        "maximum": 86400
                      },
                      "min_events": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 10000000
                      },
                      "max_events": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      },
                      "max_failure_rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "min_samples": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "seconds"
                    ],
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "anyOf": [
                          {
                            "required": [
                              "min_events"
                            ]
                          },
                          {
                            "required": [
                              "max_events"
                            ]
                          },
                          {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        ]
                      },
                      {
                        "if": {
                          "required": [
                            "min_samples"
                          ]
                        },
                        "then": {
                          "required": [
                            "max_failure_rate"
                          ]
                        }
                      }
                    ],
                    "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                  }
                },
                "additionalProperties": false,
                "anyOf": [
                  {
                    "required": [
                      "allowed_action_types"
                    ]
                  },
                  {
                    "required": [
                      "min_severity"
                    ]
                  },
                  {
                    "required": [
                      "max_arrival_delay_seconds"
                    ]
                  },
                  {
                    "required": [
                      "stale_after_seconds"
                    ]
                  },
                  {
                    "required": [
                      "window"
                    ]
                  },
                  {
                    "required": [
                      "alert_on_failure"
                    ],
                    "properties": {
                      "alert_on_failure": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_action_sha256"
                    ],
                    "properties": {
                      "require_action_sha256": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_sequence_continuity"
                    ],
                    "properties": {
                      "require_sequence_continuity": {
                        "const": true
                      }
                    }
                  },
                  {
                    "required": [
                      "require_digest_chain"
                    ],
                    "properties": {
                      "require_digest_chain": {
                        "const": true
                      }
                    }
                  }
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "checkpoint": {
                "type": "object",
                "properties": {
                  "last_sequence": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "last_evaluated_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "evaluated_through": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "next_window_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "last_sequence",
                  "last_evaluated_at",
                  "evaluated_through",
                  "next_window_at"
                ],
                "additionalProperties": false
              },
              "notice": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "name",
              "description",
              "status",
              "version",
              "rules",
              "created_by",
              "created_at",
              "updated_at",
              "checkpoint",
              "notice"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "policy"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_version": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483646
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "status": {
            "type": "string",
            "enum": [
              "enabled",
              "paused"
            ]
          },
          "rules": {
            "type": "object",
            "properties": {
              "allowed_action_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "minItems": 1,
                "maxItems": 100,
                "uniqueItems": true
              },
              "alert_on_failure": {
                "type": "boolean"
              },
              "min_severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "require_action_sha256": {
                "type": "boolean"
              },
              "max_arrival_delay_seconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 2592000
              },
              "require_sequence_continuity": {
                "type": "boolean"
              },
              "require_digest_chain": {
                "type": "boolean"
              },
              "stale_after_seconds": {
                "type": "integer",
                "minimum": 60,
                "maximum": 2592000
              },
              "window": {
                "type": "object",
                "properties": {
                  "seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400
                  },
                  "min_events": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_failure_rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "min_samples": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  }
                },
                "required": [
                  "seconds"
                ],
                "additionalProperties": false,
                "allOf": [
                  {
                    "anyOf": [
                      {
                        "required": [
                          "min_events"
                        ]
                      },
                      {
                        "required": [
                          "max_events"
                        ]
                      },
                      {
                        "required": [
                          "max_failure_rate"
                        ]
                      }
                    ]
                  },
                  {
                    "if": {
                      "required": [
                        "min_samples"
                      ]
                    },
                    "then": {
                      "required": [
                        "max_failure_rate"
                      ]
                    }
                  }
                ],
                "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
              }
            },
            "additionalProperties": false,
            "anyOf": [
              {
                "required": [
                  "allowed_action_types"
                ]
              },
              {
                "required": [
                  "min_severity"
                ]
              },
              {
                "required": [
                  "max_arrival_delay_seconds"
                ]
              },
              {
                "required": [
                  "stale_after_seconds"
                ]
              },
              {
                "required": [
                  "window"
                ]
              },
              {
                "required": [
                  "alert_on_failure"
                ],
                "properties": {
                  "alert_on_failure": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_action_sha256"
                ],
                "properties": {
                  "require_action_sha256": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_sequence_continuity"
                ],
                "properties": {
                  "require_sequence_continuity": {
                    "const": true
                  }
                }
              },
              {
                "required": [
                  "require_digest_chain"
                ],
                "properties": {
                  "require_digest_chain": {
                    "const": true
                  }
                }
              }
            ]
          }
        },
        "required": [
          "expected_version"
        ],
        "additionalProperties": false,
        "anyOf": [
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "description"
            ]
          },
          {
            "required": [
              "status"
            ]
          },
          {
            "required": [
              "rules"
            ]
          }
        ]
      }
    },
    {
      "operation_id": "operations_policy_versions",
      "response_schema": {
        "type": "object",
        "properties": {
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "version": {
                  "type": "integer",
                  "minimum": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "enabled",
                    "paused"
                  ]
                },
                "rules": {
                  "type": "object",
                  "properties": {
                    "allowed_action_types": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 96,
                        "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                      },
                      "minItems": 1,
                      "maxItems": 100,
                      "uniqueItems": true
                    },
                    "alert_on_failure": {
                      "type": "boolean"
                    },
                    "min_severity": {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    "require_action_sha256": {
                      "type": "boolean"
                    },
                    "max_arrival_delay_seconds": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 2592000
                    },
                    "require_sequence_continuity": {
                      "type": "boolean"
                    },
                    "require_digest_chain": {
                      "type": "boolean"
                    },
                    "stale_after_seconds": {
                      "type": "integer",
                      "minimum": 60,
                      "maximum": 2592000
                    },
                    "window": {
                      "type": "object",
                      "properties": {
                        "seconds": {
                          "type": "integer",
                          "minimum": 60,
                          "maximum": 86400
                        },
                        "min_events": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000000
                        },
                        "max_events": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000000
                        },
                        "max_failure_rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "min_samples": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 10000000
                        }
                      },
                      "required": [
                        "seconds"
                      ],
                      "additionalProperties": false,
                      "allOf": [
                        {
                          "anyOf": [
                            {
                              "required": [
                                "min_events"
                              ]
                            },
                            {
                              "required": [
                                "max_events"
                              ]
                            },
                            {
                              "required": [
                                "max_failure_rate"
                              ]
                            }
                          ]
                        },
                        {
                          "if": {
                            "required": [
                              "min_samples"
                            ]
                          },
                          "then": {
                            "required": [
                              "max_failure_rate"
                            ]
                          }
                        }
                      ],
                      "description": "At least one event-count or failure-rate condition is required. When both counts are present, min_events must not exceed max_events."
                    }
                  },
                  "additionalProperties": false,
                  "anyOf": [
                    {
                      "required": [
                        "allowed_action_types"
                      ]
                    },
                    {
                      "required": [
                        "min_severity"
                      ]
                    },
                    {
                      "required": [
                        "max_arrival_delay_seconds"
                      ]
                    },
                    {
                      "required": [
                        "stale_after_seconds"
                      ]
                    },
                    {
                      "required": [
                        "window"
                      ]
                    },
                    {
                      "required": [
                        "alert_on_failure"
                      ],
                      "properties": {
                        "alert_on_failure": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_action_sha256"
                      ],
                      "properties": {
                        "require_action_sha256": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_sequence_continuity"
                      ],
                      "properties": {
                        "require_sequence_continuity": {
                          "const": true
                        }
                      }
                    },
                    {
                      "required": [
                        "require_digest_chain"
                      ],
                      "properties": {
                        "require_digest_chain": {
                          "const": true
                        }
                      }
                    }
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                }
              },
              "required": [
                "version",
                "name",
                "description",
                "status",
                "rules",
                "created_by",
                "created_at"
              ],
              "additionalProperties": false
            }
          },
          "next_before": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "versions",
          "next_before",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_service_export",
      "response_schema": {
        "type": "object",
        "properties": {
          "spec": {
            "const": "rs-activity-evidence/1"
          },
          "id": {
            "type": "string",
            "pattern": "^act_[a-f0-9]{20}$"
          },
          "issued_at": {
            "type": "string",
            "format": "date-time"
          },
          "issuer": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "key_id": {
                "type": "string",
                "minLength": 1
              },
              "public_key_pem": {
                "type": "string",
                "minLength": 1
              },
              "block_key_status": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "current",
                      "retired",
                      "revoked",
                      "unknown"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "key_id",
              "public_key_pem",
              "block_key_status"
            ],
            "additionalProperties": false
          },
          "opening": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "salt": {
            "type": "string",
            "pattern": "^[a-f0-9]{32}$"
          },
          "commitment": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "ledger": {
            "type": "object",
            "properties": {
              "entry": {
                "type": "object",
                "properties": {
                  "seq": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "type": {
                    "const": "activity.receipt"
                  },
                  "subject": {
                    "type": "string"
                  },
                  "payload": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "texts": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "salt": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "redacted_at": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "value",
                        "salt",
                        "redacted_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "data": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": true
                  },
                  "payload_hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "leaf_hash": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "block_height": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": 0
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "seq",
                  "at",
                  "type",
                  "subject",
                  "payload",
                  "texts",
                  "data",
                  "payload_hash",
                  "leaf_hash",
                  "block_height"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "sealed"
                ]
              },
              "block": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "v": {
                        "const": 1
                      },
                      "height": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "prev_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "merkle_root": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "first_seq": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "last_seq": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "entry_count": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "at": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "key_id": {
                        "type": "string",
                        "minLength": 1
                      },
                      "block_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "signature": {
                        "type": "string",
                        "minLength": 1
                      },
                      "public_key_pem": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "v",
                      "height",
                      "prev_hash",
                      "merkle_root",
                      "first_seq",
                      "last_seq",
                      "entry_count",
                      "at",
                      "key_id",
                      "block_hash",
                      "signature",
                      "public_key_pem"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "proof": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "leaf_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "index": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "path": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "side": {
                              "type": "string",
                              "enum": [
                                "L",
                                "R"
                              ]
                            },
                            "hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "side",
                            "hash"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "merkle_root": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      },
                      "how_to_verify": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "leaf_hash",
                      "index",
                      "path",
                      "merkle_root",
                      "how_to_verify"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "entry",
              "status",
              "block",
              "proof"
            ],
            "additionalProperties": false
          },
          "evidence_note": {
            "type": "string",
            "minLength": 1
          },
          "verification": {
            "type": "object",
            "properties": {
              "issuer_key": {
                "type": "string",
                "minLength": 1
              },
              "commitment": {
                "type": "string",
                "minLength": 1
              },
              "inclusion": {
                "type": "string",
                "minLength": 1
              },
              "receipt_id": {
                "type": "string",
                "minLength": 1
              },
              "finality": {
                "type": "string",
                "minLength": 1
              },
              "action_digest": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "issuer_key",
              "commitment",
              "inclusion",
              "receipt_id",
              "finality",
              "action_digest"
            ],
            "additionalProperties": false
          },
          "export_signature": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "spec",
          "id",
          "issued_at",
          "issuer",
          "opening",
          "salt",
          "commitment",
          "ledger",
          "evidence_note",
          "verification",
          "export_signature"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_service_ingest",
      "response_schema": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "pattern": "^opb_[a-f0-9]{24}$"
          },
          "mode": {
            "type": "string",
            "enum": [
              "atomic",
              "partial"
            ]
          },
          "accepted": {
            "type": "integer",
            "minimum": 0
          },
          "duplicates": {
            "type": "integer",
            "minimum": 0
          },
          "rejected": {
            "type": "integer",
            "minimum": 0
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "accepted",
                        "duplicate"
                      ]
                    },
                    "event": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^act_[a-f0-9]{20}$"
                        },
                        "workspace_id": {
                          "type": "string",
                          "pattern": "^opw_[a-f0-9]{24}$"
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "client_event_id": {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "occurred_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "received_at": {
                          "type": "string",
                          "format": "date-time"
                        },
                        "action_type": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "outcome": {
                          "type": "string",
                          "enum": [
                            "success",
                            "failure",
                            "unknown"
                          ]
                        },
                        "severity": {
                          "type": "string",
                          "enum": [
                            "debug",
                            "info",
                            "warning",
                            "error",
                            "critical"
                          ]
                        },
                        "summary": {
                          "type": "string",
                          "maxLength": 2048
                        },
                        "action_sha256": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "maxItems": 16,
                          "uniqueItems": true
                        },
                        "actor_tenant_id": {
                          "type": "string",
                          "pattern": "^ten_[a-f0-9]{20}$"
                        },
                        "request_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "previous_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "event_hash": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "ledger_seq": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 1
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "workspace_id",
                        "stream_id",
                        "client_event_id",
                        "sequence",
                        "occurred_at",
                        "received_at",
                        "action_type",
                        "outcome",
                        "severity",
                        "summary",
                        "action_sha256",
                        "tags",
                        "actor_tenant_id",
                        "request_hash",
                        "previous_hash",
                        "event_hash",
                        "ledger_seq"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "event"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "index": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "client_event_id": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 160,
                          "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "status": {
                      "const": "rejected"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "operations_invalid",
                            "operations_forbidden",
                            "operations_not_found",
                            "operations_conflict",
                            "operations_limit",
                            "operations_unavailable"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "status": {
                          "type": "integer",
                          "minimum": 400,
                          "maximum": 599
                        }
                      },
                      "required": [
                        "code",
                        "message",
                        "status"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "index",
                    "client_event_id",
                    "status",
                    "error"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "replayed": {
            "type": "boolean"
          }
        },
        "required": [
          "batch_id",
          "mode",
          "accepted",
          "duplicates",
          "rejected",
          "results",
          "replayed"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16
                }
              },
              "required": [
                "client_event_id",
                "action_type"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100
          },
          "mode": {
            "type": "string",
            "enum": [
              "atomic",
              "partial"
            ],
            "default": "partial"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 160,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^opw_[a-f0-9]{24}$"
          },
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          }
        },
        "required": [
          "workspace_id",
          "stream_id",
          "events"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_service_read",
      "response_schema": {
        "type": "object",
        "properties": {
          "event": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^act_[a-f0-9]{20}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "stream_id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "client_event_id": {
                "type": "string",
                "maxLength": 160,
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1
              },
              "occurred_at": {
                "type": "string",
                "format": "date-time"
              },
              "received_at": {
                "type": "string",
                "format": "date-time"
              },
              "action_type": {
                "type": "string",
                "maxLength": 96,
                "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "success",
                  "failure",
                  "unknown"
                ]
              },
              "severity": {
                "type": "string",
                "enum": [
                  "debug",
                  "info",
                  "warning",
                  "error",
                  "critical"
                ]
              },
              "summary": {
                "type": "string",
                "maxLength": 2048
              },
              "action_sha256": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64
                },
                "maxItems": 16,
                "uniqueItems": true
              },
              "actor_tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "request_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "previous_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "event_hash": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "ledger_seq": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "stream_id",
              "client_event_id",
              "sequence",
              "occurred_at",
              "received_at",
              "action_type",
              "outcome",
              "severity",
              "summary",
              "action_sha256",
              "tags",
              "actor_tenant_id",
              "request_hash",
              "previous_hash",
              "event_hash",
              "ledger_seq"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "event"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_service_reconcile",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "results": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "recorded",
                        "conflict"
                      ]
                    },
                    "content_matches": {
                      "type": "boolean"
                    },
                    "event_id": {
                      "type": "string",
                      "pattern": "^act_[a-f0-9]{20}$"
                    },
                    "sequence": {
                      "type": "integer",
                      "minimum": 1
                    },
                    "event_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "request_hash": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "received_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "ledger_seq": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 1
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status",
                    "event_id",
                    "sequence",
                    "event_hash",
                    "request_hash",
                    "received_at",
                    "ledger_seq"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "client_event_id": {
                      "type": "string",
                      "maxLength": 160,
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                    },
                    "status": {
                      "const": "missing"
                    },
                    "content_matches": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "client_event_id",
                    "status"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "minItems": 1,
            "maxItems": 100
          },
          "recorded": {
            "type": "integer",
            "minimum": 0
          },
          "missing": {
            "type": "integer",
            "minimum": 0
          },
          "conflicts": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "stream_id",
          "results",
          "recorded",
          "missing",
          "conflicts"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "client_event_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 160,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
            },
            "minItems": 1,
            "maxItems": 100
          },
          "expected_events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-fA-F0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16
                }
              },
              "required": [
                "client_event_id",
                "action_type"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "One event for each client_event_id, in the same order, with the matching key. Presence alone does not establish content equivalence."
          },
          "workspace_id": {
            "type": "string",
            "pattern": "^opw_[a-f0-9]{24}$"
          },
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          }
        },
        "required": [
          "workspace_id",
          "stream_id",
          "client_event_ids"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_signal_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "signals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cursor": {
                  "type": "string",
                  "minLength": 1
                },
                "spec": {
                  "const": "rs-operations-alert/1"
                },
                "id": {
                  "type": "string",
                  "pattern": "^opsig_[a-f0-9]{24}$"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "exception.opened",
                    "exception.updated",
                    "case.decided",
                    "statement.issued",
                    "schedule.failed",
                    "endpoint.ping"
                  ]
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "severity": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "debug",
                        "info",
                        "warning",
                        "error",
                        "critical"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "stream_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^opst_[a-f0-9]{24}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "subject_id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "data": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "details": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "links": {
                  "type": "object",
                  "properties": {
                    "api": {
                      "type": "string",
                      "minLength": 1
                    },
                    "console": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "api",
                    "console"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "cursor",
                "spec",
                "id",
                "type",
                "workspace_id",
                "created_at",
                "severity",
                "stream_id",
                "subject_id",
                "data",
                "links"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "next_after": {
            "type": "string",
            "minLength": 1
          },
          "has_more": {
            "type": "boolean"
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "signals",
          "next_after",
          "has_more",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_spec",
      "response_schema": {
        "type": "object",
        "properties": {
          "spec": {
            "const": "rs-operations/1"
          },
          "title": {
            "type": "string",
            "minLength": 1
          },
          "console": {
            "type": "string",
            "minLength": 1
          },
          "api_root": {
            "type": "string",
            "minLength": 1
          },
          "openapi": {
            "type": "string",
            "minLength": 1
          },
          "authentication": {
            "type": "object",
            "properties": {
              "account": {
                "type": "string",
                "minLength": 1
              },
              "service": {
                "type": "string",
                "minLength": 1
              },
              "grant_changes": {
                "type": "string",
                "minLength": 1
              },
              "secrets": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "account",
              "service",
              "grant_changes",
              "secrets"
            ],
            "additionalProperties": false
          },
          "limits": {
            "type": "object",
            "properties": {
              "batch_events": {
                "const": 100
              },
              "reconcile_keys": {
                "const": 100
              },
              "event_bytes": {
                "const": 32768
              },
              "batch_bytes": {
                "const": 1048576
              },
              "operations_http_json_bytes": {
                "const": 1048576
              },
              "case_verification_http_json_bytes": {
                "const": 4194304
              },
              "selected_case_events": {
                "const": 100
              },
              "owned_workspaces": {
                "const": 25
              },
              "workspace_members": {
                "const": 250
              },
              "streams_per_workspace": {
                "const": 100
              },
              "credential_expiry_days": {
                "const": 90
              }
            },
            "required": [
              "batch_events",
              "reconcile_keys",
              "event_bytes",
              "batch_bytes",
              "operations_http_json_bytes",
              "case_verification_http_json_bytes",
              "selected_case_events",
              "owned_workspaces",
              "workspace_members",
              "streams_per_workspace",
              "credential_expiry_days"
            ],
            "additionalProperties": false
          },
          "guarantees": {
            "type": "object",
            "properties": {
              "durability": {
                "type": "string",
                "minLength": 1
              },
              "reconciliation": {
                "type": "string",
                "minLength": 1
              },
              "privacy": {
                "type": "string",
                "minLength": 1
              },
              "evidence": {
                "type": "string",
                "minLength": 1
              },
              "local_outbox": {
                "type": "string",
                "minLength": 1
              },
              "notifications": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "durability",
              "reconciliation",
              "privacy",
              "evidence",
              "local_outbox",
              "notifications"
            ],
            "additionalProperties": false
          },
          "operations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "operation_id": {
                  "type": "string",
                  "minLength": 1
                },
                "response_schema": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true
                },
                "request_schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "operation_id",
                "response_schema",
                "request_schema"
              ],
              "additionalProperties": false
            }
          },
          "downloads": {
            "type": "object",
            "properties": {
              "python": {
                "type": "string",
                "minLength": 1
              },
              "node": {
                "type": "string",
                "minLength": 1
              },
              "activity_verifier": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "python",
              "node",
              "activity_verifier"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "spec",
          "title",
          "console",
          "api_root",
          "openapi",
          "authentication",
          "limits",
          "guarantees",
          "operations",
          "downloads"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_statement_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "spec": {
                    "const": "rs-operations-statement/1"
                  },
                  "issuer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "kid": {
                    "type": "string",
                    "minLength": 1
                  },
                  "statement_id": {
                    "type": "string",
                    "pattern": "^opstm_[a-f0-9]{24}$"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "custom"
                    ]
                  },
                  "period": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "additionalProperties": false
                  },
                  "issued_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "previous_statement_sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "workspace": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^opw_[a-f0-9]{24}$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "environment": {
                        "type": "string",
                        "enum": [
                          "live",
                          "sandbox"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "environment"
                    ],
                    "additionalProperties": false
                  },
                  "streams": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ordinal": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "status_at_issue": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "archived"
                          ]
                        },
                        "events": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "success": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failure": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unknown": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "by_severity": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "required": [
                            "total",
                            "success",
                            "failure",
                            "unknown",
                            "by_severity"
                          ],
                          "additionalProperties": false
                        },
                        "sequence_range": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "first": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "last": {
                                  "type": "integer",
                                  "minimum": 1
                                }
                              },
                              "required": [
                                "first",
                                "last"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "head_at_period_end": {
                          "type": "object",
                          "properties": {
                            "sequence": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "event_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "sequence",
                            "event_hash"
                          ],
                          "additionalProperties": false
                        },
                        "chain": {
                          "type": "object",
                          "properties": {
                            "checked": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "events_in_range": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "complete": {
                              "type": "boolean"
                            },
                            "valid": {
                              "type": "boolean"
                            },
                            "breaks": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "first_invalid_sequence": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "boundary_sequence": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "checked",
                            "events_in_range",
                            "complete",
                            "valid",
                            "breaks",
                            "first_invalid_sequence",
                            "boundary_sequence"
                          ],
                          "additionalProperties": false
                        },
                        "public_ledger": {
                          "type": "object",
                          "properties": {
                            "committed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "sealed": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "committed",
                            "sealed"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ordinal",
                        "stream_id",
                        "name",
                        "status_at_issue",
                        "events",
                        "sequence_range",
                        "head_at_period_end",
                        "chain",
                        "public_ledger"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 100
                  },
                  "totals": {
                    "type": "object",
                    "properties": {
                      "events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "failures": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "chain_breaks": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "committed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sealed": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "events",
                      "failures",
                      "chain_breaks",
                      "committed",
                      "sealed"
                    ],
                    "additionalProperties": false
                  },
                  "exceptions": {
                    "type": "object",
                    "properties": {
                      "opened": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "opened_by_severity": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "opened_by_rule": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "acknowledged": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "resolved": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "median_seconds_to_resolve": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "open_at_period_end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "oldest_open_opened_at": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "opened",
                      "opened_by_severity",
                      "opened_by_rule",
                      "acknowledged",
                      "resolved",
                      "median_seconds_to_resolve",
                      "open_at_period_end",
                      "oldest_open_opened_at"
                    ],
                    "additionalProperties": false
                  },
                  "cases": {
                    "type": "object",
                    "properties": {
                      "opened": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "decisions": {
                        "type": "object",
                        "properties": {
                          "accepted": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "needs_information": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "rejected": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "accepted",
                          "needs_information",
                          "rejected"
                        ],
                        "additionalProperties": false
                      },
                      "open_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "opened",
                      "decisions",
                      "open_at_issue"
                    ],
                    "additionalProperties": false
                  },
                  "policies": {
                    "type": "object",
                    "properties": {
                      "policies_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "scheduled_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "evaluations": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "events_evaluated": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "exceptions_created_by_evaluations": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "policies_at_issue",
                      "enabled_at_issue",
                      "scheduled_at_issue",
                      "evaluations",
                      "events_evaluated",
                      "exceptions_created_by_evaluations"
                    ],
                    "additionalProperties": false
                  },
                  "access": {
                    "type": "object",
                    "properties": {
                      "members_active_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "membership_changes": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "credentials_issued": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "credentials_revoked": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "credentials_active_at_period_end": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "members_active_at_issue",
                      "membership_changes",
                      "credentials_issued",
                      "credentials_revoked",
                      "credentials_active_at_period_end"
                    ],
                    "additionalProperties": false
                  },
                  "alerts": {
                    "type": "object",
                    "properties": {
                      "signals": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "deliveries_by_status_at_issue": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "endpoints_active_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "signals",
                      "deliveries_by_status_at_issue",
                      "endpoints_active_at_issue"
                    ],
                    "additionalProperties": false
                  },
                  "audit": {
                    "type": "object",
                    "properties": {
                      "boundary_seq": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "entries_in_period": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "checked": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "complete": {
                        "type": "boolean"
                      },
                      "valid": {
                        "type": "boolean"
                      },
                      "first_invalid_seq": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "head_seq": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "head_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "boundary_seq",
                      "entries_in_period",
                      "checked",
                      "complete",
                      "valid",
                      "first_invalid_seq",
                      "head_seq",
                      "head_hash"
                    ],
                    "additionalProperties": false
                  },
                  "verdict": {
                    "type": "object",
                    "properties": {
                      "chains_valid": {
                        "type": "boolean"
                      },
                      "chains_complete": {
                        "type": "boolean"
                      },
                      "audit_valid": {
                        "type": "boolean"
                      },
                      "audit_complete": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "chains_valid",
                      "chains_complete",
                      "audit_valid",
                      "audit_complete"
                    ],
                    "additionalProperties": false
                  },
                  "limitations": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 4
                  }
                },
                "required": [
                  "spec",
                  "issuer",
                  "kid",
                  "statement_id",
                  "sequence",
                  "kind",
                  "period",
                  "issued_at",
                  "previous_statement_sha256",
                  "workspace",
                  "streams",
                  "totals",
                  "exceptions",
                  "cases",
                  "policies",
                  "access",
                  "alerts",
                  "audit",
                  "verdict",
                  "limitations"
                ],
                "additionalProperties": false
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "signature": {
                "type": "string",
                "minLength": 1
              },
              "alg": {
                "const": "EdDSA"
              },
              "kid": {
                "type": "string",
                "minLength": 1
              },
              "how_to_verify": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "document",
              "sha256",
              "signature",
              "alg",
              "kid",
              "how_to_verify"
            ],
            "additionalProperties": false
          },
          "summary": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opstm_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "weekly",
                  "custom"
                ]
              },
              "period_start": {
                "type": "string",
                "format": "date-time"
              },
              "period_end": {
                "type": "string",
                "format": "date-time"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "previous_sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "kid": {
                "type": "string",
                "minLength": 1
              },
              "issued_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "verdict": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "chains_valid": {
                        "type": "boolean"
                      },
                      "chains_complete": {
                        "type": "boolean"
                      },
                      "audit_valid": {
                        "type": "boolean"
                      },
                      "audit_complete": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "chains_valid",
                      "chains_complete",
                      "audit_valid",
                      "audit_complete"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totals": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "failures": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "chain_breaks": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "committed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sealed": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "events",
                      "failures",
                      "chain_breaks",
                      "committed",
                      "sealed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "sequence",
              "kind",
              "period_start",
              "period_end",
              "sha256",
              "previous_sha256",
              "kid",
              "issued_by",
              "issued_at",
              "verdict",
              "totals"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "statement",
          "summary",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_statement_issue",
      "response_schema": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "object",
            "properties": {
              "document": {
                "type": "object",
                "properties": {
                  "spec": {
                    "const": "rs-operations-statement/1"
                  },
                  "issuer": {
                    "type": "string",
                    "minLength": 1
                  },
                  "kid": {
                    "type": "string",
                    "minLength": 1
                  },
                  "statement_id": {
                    "type": "string",
                    "pattern": "^opstm_[a-f0-9]{24}$"
                  },
                  "sequence": {
                    "type": "integer",
                    "minimum": 1
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "weekly",
                      "custom"
                    ]
                  },
                  "period": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "string",
                        "format": "date-time"
                      },
                      "end": {
                        "type": "string",
                        "format": "date-time"
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ],
                    "additionalProperties": false
                  },
                  "issued_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "previous_statement_sha256": {
                    "type": "string",
                    "pattern": "^[a-f0-9]{64}$"
                  },
                  "workspace": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^opw_[a-f0-9]{24}$"
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "environment": {
                        "type": "string",
                        "enum": [
                          "live",
                          "sandbox"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "environment"
                    ],
                    "additionalProperties": false
                  },
                  "streams": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "ordinal": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "stream_id": {
                          "type": "string",
                          "pattern": "^opst_[a-f0-9]{24}$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 120
                        },
                        "status_at_issue": {
                          "type": "string",
                          "enum": [
                            "active",
                            "paused",
                            "archived"
                          ]
                        },
                        "events": {
                          "type": "object",
                          "properties": {
                            "total": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "success": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "failure": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "unknown": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "by_severity": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": 0
                              }
                            }
                          },
                          "required": [
                            "total",
                            "success",
                            "failure",
                            "unknown",
                            "by_severity"
                          ],
                          "additionalProperties": false
                        },
                        "sequence_range": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "first": {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                "last": {
                                  "type": "integer",
                                  "minimum": 1
                                }
                              },
                              "required": [
                                "first",
                                "last"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "head_at_period_end": {
                          "type": "object",
                          "properties": {
                            "sequence": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "event_hash": {
                              "type": "string",
                              "pattern": "^[a-f0-9]{64}$"
                            }
                          },
                          "required": [
                            "sequence",
                            "event_hash"
                          ],
                          "additionalProperties": false
                        },
                        "chain": {
                          "type": "object",
                          "properties": {
                            "checked": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "events_in_range": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "complete": {
                              "type": "boolean"
                            },
                            "valid": {
                              "type": "boolean"
                            },
                            "breaks": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "first_invalid_sequence": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "boundary_sequence": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": 1
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "checked",
                            "events_in_range",
                            "complete",
                            "valid",
                            "breaks",
                            "first_invalid_sequence",
                            "boundary_sequence"
                          ],
                          "additionalProperties": false
                        },
                        "public_ledger": {
                          "type": "object",
                          "properties": {
                            "committed": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "sealed": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "committed",
                            "sealed"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "ordinal",
                        "stream_id",
                        "name",
                        "status_at_issue",
                        "events",
                        "sequence_range",
                        "head_at_period_end",
                        "chain",
                        "public_ledger"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 100
                  },
                  "totals": {
                    "type": "object",
                    "properties": {
                      "events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "failures": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "chain_breaks": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "committed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sealed": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "events",
                      "failures",
                      "chain_breaks",
                      "committed",
                      "sealed"
                    ],
                    "additionalProperties": false
                  },
                  "exceptions": {
                    "type": "object",
                    "properties": {
                      "opened": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "opened_by_severity": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "opened_by_rule": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "acknowledged": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "resolved": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "median_seconds_to_resolve": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "open_at_period_end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "oldest_open_opened_at": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "date-time"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "opened",
                      "opened_by_severity",
                      "opened_by_rule",
                      "acknowledged",
                      "resolved",
                      "median_seconds_to_resolve",
                      "open_at_period_end",
                      "oldest_open_opened_at"
                    ],
                    "additionalProperties": false
                  },
                  "cases": {
                    "type": "object",
                    "properties": {
                      "opened": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "decisions": {
                        "type": "object",
                        "properties": {
                          "accepted": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "needs_information": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "rejected": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "accepted",
                          "needs_information",
                          "rejected"
                        ],
                        "additionalProperties": false
                      },
                      "open_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "opened",
                      "decisions",
                      "open_at_issue"
                    ],
                    "additionalProperties": false
                  },
                  "policies": {
                    "type": "object",
                    "properties": {
                      "policies_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "enabled_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "scheduled_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "evaluations": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "events_evaluated": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "exceptions_created_by_evaluations": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "policies_at_issue",
                      "enabled_at_issue",
                      "scheduled_at_issue",
                      "evaluations",
                      "events_evaluated",
                      "exceptions_created_by_evaluations"
                    ],
                    "additionalProperties": false
                  },
                  "access": {
                    "type": "object",
                    "properties": {
                      "members_active_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "membership_changes": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "credentials_issued": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "credentials_revoked": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "credentials_active_at_period_end": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "members_active_at_issue",
                      "membership_changes",
                      "credentials_issued",
                      "credentials_revoked",
                      "credentials_active_at_period_end"
                    ],
                    "additionalProperties": false
                  },
                  "alerts": {
                    "type": "object",
                    "properties": {
                      "signals": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "deliveries_by_status_at_issue": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "endpoints_active_at_issue": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "signals",
                      "deliveries_by_status_at_issue",
                      "endpoints_active_at_issue"
                    ],
                    "additionalProperties": false
                  },
                  "audit": {
                    "type": "object",
                    "properties": {
                      "boundary_seq": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "entries_in_period": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "checked": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "complete": {
                        "type": "boolean"
                      },
                      "valid": {
                        "type": "boolean"
                      },
                      "first_invalid_seq": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": 0
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "head_seq": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "head_hash": {
                        "type": "string",
                        "pattern": "^[a-f0-9]{64}$"
                      }
                    },
                    "required": [
                      "boundary_seq",
                      "entries_in_period",
                      "checked",
                      "complete",
                      "valid",
                      "first_invalid_seq",
                      "head_seq",
                      "head_hash"
                    ],
                    "additionalProperties": false
                  },
                  "verdict": {
                    "type": "object",
                    "properties": {
                      "chains_valid": {
                        "type": "boolean"
                      },
                      "chains_complete": {
                        "type": "boolean"
                      },
                      "audit_valid": {
                        "type": "boolean"
                      },
                      "audit_complete": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "chains_valid",
                      "chains_complete",
                      "audit_valid",
                      "audit_complete"
                    ],
                    "additionalProperties": false
                  },
                  "limitations": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    },
                    "minItems": 4
                  }
                },
                "required": [
                  "spec",
                  "issuer",
                  "kid",
                  "statement_id",
                  "sequence",
                  "kind",
                  "period",
                  "issued_at",
                  "previous_statement_sha256",
                  "workspace",
                  "streams",
                  "totals",
                  "exceptions",
                  "cases",
                  "policies",
                  "access",
                  "alerts",
                  "audit",
                  "verdict",
                  "limitations"
                ],
                "additionalProperties": false
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "signature": {
                "type": "string",
                "minLength": 1
              },
              "alg": {
                "const": "EdDSA"
              },
              "kid": {
                "type": "string",
                "minLength": 1
              },
              "how_to_verify": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "document",
              "sha256",
              "signature",
              "alg",
              "kid",
              "how_to_verify"
            ],
            "additionalProperties": false
          },
          "summary": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opstm_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "sequence": {
                "type": "integer",
                "minimum": 1
              },
              "kind": {
                "type": "string",
                "enum": [
                  "weekly",
                  "custom"
                ]
              },
              "period_start": {
                "type": "string",
                "format": "date-time"
              },
              "period_end": {
                "type": "string",
                "format": "date-time"
              },
              "sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "previous_sha256": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "kid": {
                "type": "string",
                "minLength": 1
              },
              "issued_by": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "issued_at": {
                "type": "string",
                "format": "date-time"
              },
              "verdict": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "chains_valid": {
                        "type": "boolean"
                      },
                      "chains_complete": {
                        "type": "boolean"
                      },
                      "audit_valid": {
                        "type": "boolean"
                      },
                      "audit_complete": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "chains_valid",
                      "chains_complete",
                      "audit_valid",
                      "audit_complete"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "totals": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "failures": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "chain_breaks": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "committed": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "sealed": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "events",
                      "failures",
                      "chain_breaks",
                      "committed",
                      "sealed"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "sequence",
              "kind",
              "period_start",
              "period_end",
              "sha256",
              "previous_sha256",
              "kid",
              "issued_by",
              "issued_at",
              "verdict",
              "totals"
            ],
            "additionalProperties": false
          },
          "created": {
            "type": "boolean"
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "statement",
          "summary",
          "created",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "period_start",
          "period_end"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_statement_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "statements": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opstm_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "weekly",
                    "custom"
                  ]
                },
                "period_start": {
                  "type": "string",
                  "format": "date-time"
                },
                "period_end": {
                  "type": "string",
                  "format": "date-time"
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "previous_sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "kid": {
                  "type": "string",
                  "minLength": 1
                },
                "issued_by": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^ten_[a-f0-9]{20}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "issued_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "verdict": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "chains_valid": {
                          "type": "boolean"
                        },
                        "chains_complete": {
                          "type": "boolean"
                        },
                        "audit_valid": {
                          "type": "boolean"
                        },
                        "audit_complete": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "chains_valid",
                        "chains_complete",
                        "audit_valid",
                        "audit_complete"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "totals": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "events": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failures": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "chain_breaks": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "committed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "sealed": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "events",
                        "failures",
                        "chain_breaks",
                        "committed",
                        "sealed"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "sequence",
                "kind",
                "period_start",
                "period_end",
                "sha256",
                "previous_sha256",
                "kid",
                "issued_by",
                "issued_at",
                "verdict",
                "totals"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "next_before": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "schedule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^opw_[a-f0-9]{24}$"
                  },
                  "cadence": {
                    "const": "weekly"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "status_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actor_tenant_id": {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  "next_period_start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "next_period_end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "last_statement_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^opstm_[a-f0-9]{24}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "workspace_id",
                  "cadence",
                  "status",
                  "status_reason",
                  "actor_tenant_id",
                  "next_period_start",
                  "next_period_end",
                  "last_statement_id",
                  "last_run_at",
                  "last_error",
                  "created_at",
                  "updated_at",
                  "revision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "statements",
          "next_before",
          "schedule",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_statement_schedule_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "schedule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^opw_[a-f0-9]{24}$"
                  },
                  "cadence": {
                    "const": "weekly"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "status_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actor_tenant_id": {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  "next_period_start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "next_period_end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "last_statement_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^opstm_[a-f0-9]{24}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "workspace_id",
                  "cadence",
                  "status",
                  "status_reason",
                  "actor_tenant_id",
                  "next_period_start",
                  "next_period_end",
                  "last_statement_id",
                  "last_run_at",
                  "last_error",
                  "created_at",
                  "updated_at",
                  "revision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "schedule",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_statement_schedule_set",
      "response_schema": {
        "type": "object",
        "properties": {
          "schedule": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "pattern": "^opw_[a-f0-9]{24}$"
                  },
                  "cadence": {
                    "const": "weekly"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "active",
                      "paused"
                    ]
                  },
                  "status_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "actor_tenant_id": {
                    "type": "string",
                    "pattern": "^ten_[a-f0-9]{20}$"
                  },
                  "next_period_start": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "next_period_end": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "last_statement_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "pattern": "^opstm_[a-f0-9]{24}$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_run_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_error": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "updated_at": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "revision": {
                    "type": "integer",
                    "minimum": 1
                  }
                },
                "required": [
                  "workspace_id",
                  "cadence",
                  "status",
                  "status_reason",
                  "actor_tenant_id",
                  "next_period_start",
                  "next_period_end",
                  "last_statement_id",
                  "last_run_at",
                  "last_error",
                  "created_at",
                  "updated_at",
                  "revision"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "schedule",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused"
            ]
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_statement_share_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "share": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opshr_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "statement_id": {
                "type": "string",
                "pattern": "^opstm_[a-f0-9]{24}$"
              },
              "reviewer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "views": {
                "type": "integer",
                "minimum": 0
              },
              "first_viewed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_viewed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "statement_id",
              "reviewer",
              "state",
              "created_by",
              "created_at",
              "expires_at",
              "revoked_at",
              "views",
              "first_viewed_at",
              "last_viewed_at"
            ],
            "additionalProperties": false
          },
          "url": {
            "type": "string",
            "pattern": "/review/rsrv_[A-Za-z0-9_-]{43}$"
          },
          "notice": {
            "type": "string",
            "minLength": 1
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "share",
          "url",
          "notice",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "reviewer": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "expires_in_days": {
            "type": "integer",
            "minimum": 1,
            "maximum": 90,
            "default": 14
          }
        },
        "required": [
          "reviewer"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_statement_share_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "shares": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opshr_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "statement_id": {
                  "type": "string",
                  "pattern": "^opstm_[a-f0-9]{24}$"
                },
                "reviewer": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "active",
                    "expired",
                    "revoked"
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "revoked_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "views": {
                  "type": "integer",
                  "minimum": 0
                },
                "first_viewed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "last_viewed_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "statement_id",
                "reviewer",
                "state",
                "created_by",
                "created_at",
                "expires_at",
                "revoked_at",
                "views",
                "first_viewed_at",
                "last_viewed_at"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "shares",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_statement_share_revoke",
      "response_schema": {
        "type": "object",
        "properties": {
          "share": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opshr_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "statement_id": {
                "type": "string",
                "pattern": "^opstm_[a-f0-9]{24}$"
              },
              "reviewer": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "state": {
                "type": "string",
                "enum": [
                  "active",
                  "expired",
                  "revoked"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "revoked_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "views": {
                "type": "integer",
                "minimum": 0
              },
              "first_viewed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "last_viewed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "workspace_id",
              "statement_id",
              "reviewer",
              "state",
              "created_by",
              "created_at",
              "expires_at",
              "revoked_at",
              "views",
              "first_viewed_at",
              "last_viewed_at"
            ],
            "additionalProperties": false
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "share",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_statement_verify",
      "response_schema": {
        "type": "object",
        "properties": {
          "verified": {
            "type": "boolean"
          },
          "spec": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "statement_id": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^opstm_[a-f0-9]{24}$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "key_source": {
            "type": "string",
            "enum": [
              "supplied",
              "this_service"
            ]
          },
          "notice": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "verified",
          "spec",
          "statement_id",
          "reasons",
          "key_source",
          "notice"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "statement": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "previous_statement": {
            "type": "object",
            "properties": {},
            "additionalProperties": true
          },
          "trusted_public_key_pem": {
            "type": "string",
            "minLength": 1,
            "maxLength": 16384
          }
        },
        "required": [
          "statement"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_stream_archive",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ]
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "config": {
                "type": "object",
                "properties": {
                  "max_events_per_day": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_event_bytes": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 32768
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "allowed_action_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "minItems": 1,
                        "maxItems": 64,
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "max_events_per_day",
                  "max_events",
                  "max_event_bytes",
                  "require_action_sha256",
                  "allowed_action_types"
                ],
                "additionalProperties": false
              },
              "event_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_received_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "status",
              "environment",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision",
              "config",
              "event_count",
              "last_received_at",
              "chain_head",
              "last_sequence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "stream"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_stream_chain",
      "response_schema": {
        "type": "object",
        "properties": {
          "spec": {
            "const": "rs-operations-event/1"
          },
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "after_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "boundary_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "head_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "head_hash": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "checked": {
            "type": "integer",
            "minimum": 0
          },
          "range_valid": {
            "type": "boolean"
          },
          "complete": {
            "type": "boolean"
          },
          "next_after_sequence": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "checks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "sequence_valid": {
                  "type": "boolean"
                },
                "previous_hash_valid": {
                  "type": "boolean"
                },
                "event_hash_valid": {
                  "type": "boolean"
                }
              },
              "required": [
                "id",
                "sequence",
                "sequence_valid",
                "previous_hash_valid",
                "event_hash_valid"
              ],
              "additionalProperties": false
            }
          },
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^act_[a-f0-9]{20}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "stream_id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "client_event_id": {
                  "type": "string",
                  "maxLength": 160,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:@/\\-]{0,159}$"
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 1
                },
                "occurred_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "received_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "action_type": {
                  "type": "string",
                  "maxLength": 96,
                  "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "success",
                    "failure",
                    "unknown"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "debug",
                    "info",
                    "warning",
                    "error",
                    "critical"
                  ]
                },
                "summary": {
                  "type": "string",
                  "maxLength": 2048
                },
                "action_sha256": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "maxItems": 16,
                  "uniqueItems": true
                },
                "actor_tenant_id": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "request_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "previous_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "event_hash": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "ledger_seq": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "workspace_id",
                "stream_id",
                "client_event_id",
                "sequence",
                "occurred_at",
                "received_at",
                "action_type",
                "outcome",
                "severity",
                "summary",
                "action_sha256",
                "tags",
                "actor_tenant_id",
                "request_hash",
                "previous_hash",
                "event_hash",
                "ledger_seq"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "claim_execution_proven": {
            "const": false
          },
          "independent_finality_verified": {
            "const": false
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "spec",
          "stream_id",
          "after_sequence",
          "boundary_hash",
          "head_sequence",
          "head_hash",
          "checked",
          "range_valid",
          "complete",
          "next_after_sequence",
          "checks",
          "events",
          "claim_execution_proven",
          "independent_finality_verified",
          "note"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_stream_config",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ]
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "config": {
                "type": "object",
                "properties": {
                  "max_events_per_day": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_event_bytes": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 32768
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "allowed_action_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "minItems": 1,
                        "maxItems": 64,
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "max_events_per_day",
                  "max_events",
                  "max_event_bytes",
                  "require_action_sha256",
                  "allowed_action_types"
                ],
                "additionalProperties": false
              },
              "event_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_received_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "status",
              "environment",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision",
              "config",
              "event_count",
              "last_received_at",
              "chain_head",
              "last_sequence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "stream"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          },
          "config": {
            "type": "object",
            "properties": {
              "max_events_per_day": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "max_events": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              "max_event_bytes": {
                "type": "integer",
                "minimum": 256,
                "maximum": 32768
              },
              "require_action_sha256": {
                "type": "boolean"
              },
              "allowed_action_types": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_stream_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ]
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "config": {
                "type": "object",
                "properties": {
                  "max_events_per_day": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_event_bytes": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 32768
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "allowed_action_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "minItems": 1,
                        "maxItems": 64,
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "max_events_per_day",
                  "max_events",
                  "max_event_bytes",
                  "require_action_sha256",
                  "allowed_action_types"
                ],
                "additionalProperties": false
              },
              "event_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_received_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "status",
              "environment",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision",
              "config",
              "event_count",
              "last_received_at",
              "chain_head",
              "last_sequence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "stream"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "description": {
            "type": "string",
            "maxLength": 1000
          },
          "config": {
            "type": "object",
            "properties": {
              "max_events_per_day": {
                "type": "integer",
                "minimum": 1,
                "maximum": 1000000
              },
              "max_events": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10000000
              },
              "max_event_bytes": {
                "type": "integer",
                "minimum": 256,
                "maximum": 32768
              },
              "require_action_sha256": {
                "type": "boolean"
              },
              "allowed_action_types": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "maxLength": 96,
                      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                    },
                    "minItems": 1,
                    "maxItems": 64
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_stream_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ]
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "config": {
                "type": "object",
                "properties": {
                  "max_events_per_day": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_event_bytes": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 32768
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "allowed_action_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "minItems": 1,
                        "maxItems": 64,
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "max_events_per_day",
                  "max_events",
                  "max_event_bytes",
                  "require_action_sha256",
                  "allowed_action_types"
                ],
                "additionalProperties": false
              },
              "event_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_received_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "status",
              "environment",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision",
              "config",
              "event_count",
              "last_received_at",
              "chain_head",
              "last_sequence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "stream"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_stream_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "streams": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opst_[a-f0-9]{24}$"
                },
                "workspace_id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "maxLength": 1000
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "paused",
                    "archived"
                  ]
                },
                "environment": {
                  "type": "string",
                  "enum": [
                    "live",
                    "sandbox"
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "archived_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "config": {
                  "type": "object",
                  "properties": {
                    "max_events_per_day": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 1000000
                    },
                    "max_events": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000000
                    },
                    "max_event_bytes": {
                      "type": "integer",
                      "minimum": 256,
                      "maximum": 32768
                    },
                    "require_action_sha256": {
                      "type": "boolean"
                    },
                    "allowed_action_types": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "maxLength": 96,
                            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                          },
                          "minItems": 1,
                          "maxItems": 64,
                          "uniqueItems": true
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "max_events_per_day",
                    "max_events",
                    "max_event_bytes",
                    "require_action_sha256",
                    "allowed_action_types"
                  ],
                  "additionalProperties": false
                },
                "event_count": {
                  "type": "integer",
                  "minimum": 0
                },
                "last_received_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "chain_head": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "last_sequence": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "id",
                "workspace_id",
                "name",
                "description",
                "status",
                "environment",
                "created_by",
                "created_at",
                "updated_at",
                "archived_at",
                "revision",
                "config",
                "event_count",
                "last_received_at",
                "chain_head",
                "last_sequence"
              ],
              "additionalProperties": false
            },
            "maxItems": 100
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "limit": {
            "const": 100
          }
        },
        "required": [
          "streams",
          "count",
          "limit"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_stream_pause",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opst_[a-f0-9]{24}$"
              },
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "paused",
                  "archived"
                ]
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              },
              "config": {
                "type": "object",
                "properties": {
                  "max_events_per_day": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 1000000
                  },
                  "max_events": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10000000
                  },
                  "max_event_bytes": {
                    "type": "integer",
                    "minimum": 256,
                    "maximum": 32768
                  },
                  "require_action_sha256": {
                    "type": "boolean"
                  },
                  "allowed_action_types": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "maxLength": 96,
                          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$"
                        },
                        "minItems": 1,
                        "maxItems": 64,
                        "uniqueItems": true
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "max_events_per_day",
                  "max_events",
                  "max_event_bytes",
                  "require_action_sha256",
                  "allowed_action_types"
                ],
                "additionalProperties": false
              },
              "event_count": {
                "type": "integer",
                "minimum": 0
              },
              "last_received_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_head": {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              "last_sequence": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "workspace_id",
              "name",
              "description",
              "status",
              "environment",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision",
              "config",
              "event_count",
              "last_received_at",
              "chain_head",
              "last_sequence"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "stream"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          },
          "paused": {
            "type": "boolean"
          }
        },
        "required": [
          "paused"
        ],
        "additionalProperties": false
      }
    },
    {
      "operation_id": "operations_stream_stats",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "sandbox"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "total_events": {
            "type": "integer",
            "minimum": 0
          },
          "outcomes": {
            "type": "object",
            "properties": {
              "success": {
                "type": "integer",
                "minimum": 0
              },
              "failure": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "success",
              "failure",
              "unknown"
            ],
            "additionalProperties": false
          },
          "severities": {
            "type": "object",
            "properties": {
              "debug": {
                "type": "integer",
                "minimum": 0
              },
              "info": {
                "type": "integer",
                "minimum": 0
              },
              "warning": {
                "type": "integer",
                "minimum": 0
              },
              "error": {
                "type": "integer",
                "minimum": 0
              },
              "critical": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "debug",
              "info",
              "warning",
              "error",
              "critical"
            ],
            "additionalProperties": false
          },
          "first_received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "chain_head": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "last_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "today_events": {
            "type": "integer",
            "minimum": 0
          },
          "utc_day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "budget": {
            "type": "object",
            "properties": {
              "max_events": {
                "type": "integer",
                "minimum": 1
              },
              "remaining_events": {
                "type": "integer",
                "minimum": 0
              },
              "max_events_per_day": {
                "type": "integer",
                "minimum": 1
              },
              "remaining_today": {
                "type": "integer",
                "minimum": 0
              },
              "max_event_bytes": {
                "type": "integer",
                "minimum": 256
              }
            },
            "required": [
              "max_events",
              "remaining_events",
              "max_events_per_day",
              "remaining_today",
              "max_event_bytes"
            ],
            "additionalProperties": false
          },
          "ledger": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "sealed": {
                "type": "integer",
                "minimum": 0
              },
              "uncommitted": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pending",
              "sealed",
              "uncommitted"
            ],
            "additionalProperties": false
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "day",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "stream_id",
          "environment",
          "status",
          "total_events",
          "outcomes",
          "severities",
          "first_received_at",
          "last_received_at",
          "chain_head",
          "last_sequence",
          "today_events",
          "utc_day",
          "budget",
          "ledger",
          "daily",
          "note"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_stream_summary",
      "response_schema": {
        "type": "object",
        "properties": {
          "stream_id": {
            "type": "string",
            "pattern": "^opst_[a-f0-9]{24}$"
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "sandbox"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "archived"
            ]
          },
          "total_events": {
            "type": "integer",
            "minimum": 0
          },
          "outcomes": {
            "type": "object",
            "properties": {
              "success": {
                "type": "integer",
                "minimum": 0
              },
              "failure": {
                "type": "integer",
                "minimum": 0
              },
              "unknown": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "success",
              "failure",
              "unknown"
            ],
            "additionalProperties": false
          },
          "severities": {
            "type": "object",
            "properties": {
              "debug": {
                "type": "integer",
                "minimum": 0
              },
              "info": {
                "type": "integer",
                "minimum": 0
              },
              "warning": {
                "type": "integer",
                "minimum": 0
              },
              "error": {
                "type": "integer",
                "minimum": 0
              },
              "critical": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "debug",
              "info",
              "warning",
              "error",
              "critical"
            ],
            "additionalProperties": false
          },
          "first_received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "chain_head": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "last_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "today_events": {
            "type": "integer",
            "minimum": 0
          },
          "utc_day": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "budget": {
            "type": "object",
            "properties": {
              "max_events": {
                "type": "integer",
                "minimum": 1
              },
              "remaining_events": {
                "type": "integer",
                "minimum": 0
              },
              "max_events_per_day": {
                "type": "integer",
                "minimum": 1
              },
              "remaining_today": {
                "type": "integer",
                "minimum": 0
              },
              "max_event_bytes": {
                "type": "integer",
                "minimum": 256
              }
            },
            "required": [
              "max_events",
              "remaining_events",
              "max_events_per_day",
              "remaining_today",
              "max_event_bytes"
            ],
            "additionalProperties": false
          },
          "ledger": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "sealed": {
                "type": "integer",
                "minimum": 0
              },
              "uncommitted": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pending",
              "sealed",
              "uncommitted"
            ],
            "additionalProperties": false
          },
          "daily": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "required": [
                "day",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "stream_id",
          "environment",
          "status",
          "total_events",
          "outcomes",
          "severities",
          "first_received_at",
          "last_received_at",
          "chain_head",
          "last_sequence",
          "today_events",
          "utc_day",
          "budget",
          "ledger",
          "daily",
          "note"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_workspace_archive",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_workspace_create",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "required": [
          "name"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_workspace_get",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_workspace_list",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspaces": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^opw_[a-f0-9]{24}$"
                },
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 100
                },
                "description": {
                  "type": "string",
                  "maxLength": 2000
                },
                "environment": {
                  "type": "string",
                  "enum": [
                    "live",
                    "sandbox"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "archived"
                  ]
                },
                "created_by": {
                  "type": "string",
                  "pattern": "^ten_[a-f0-9]{20}$"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "archived_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revision": {
                  "type": "integer",
                  "minimum": 1
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "admin",
                    "operator",
                    "reviewer",
                    "viewer"
                  ]
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "read",
                      "write",
                      "review",
                      "manage",
                      "admin"
                    ]
                  }
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "environment",
                "status",
                "created_by",
                "created_at",
                "updated_at",
                "archived_at",
                "revision",
                "role",
                "capabilities"
              ],
              "additionalProperties": false
            },
            "maxItems": 200
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 200
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspaces",
          "next_cursor",
          "limit",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_workspace_restore",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          }
        },
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_workspace_summary",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "period": {
            "type": "object",
            "properties": {
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "days": {
                "const": 30
              }
            },
            "required": [
              "from",
              "to",
              "days"
            ],
            "additionalProperties": false
          },
          "members": {
            "type": "object",
            "properties": {
              "active": {
                "type": "integer",
                "minimum": 0
              },
              "by_role": {
                "type": "object",
                "properties": {
                  "owner": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "admin": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "operator": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "reviewer": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "viewer": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "active",
              "by_role"
            ],
            "additionalProperties": false
          },
          "invitations": {
            "type": "object",
            "properties": {
              "pending": {
                "type": "integer",
                "minimum": 0
              },
              "accepted": {
                "type": "integer",
                "minimum": 0
              },
              "cancelled": {
                "type": "integer",
                "minimum": 0
              },
              "expired": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "pending",
              "accepted",
              "cancelled",
              "expired"
            ],
            "additionalProperties": false
          },
          "records": {
            "type": "object",
            "properties": {
              "streams": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "events": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "review_cases": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "review_decisions": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "policies": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "policy_evaluations": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              },
              "exceptions": {
                "type": "object",
                "properties": {
                  "total": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_status": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  }
                },
                "required": [
                  "total"
                ],
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "ingestion_last_30_days": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "events": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "first_received_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "last_received_at": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "ingestion_batches": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "by_outcome": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "by_severity": {
                    "type": "object",
                    "properties": {},
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "daily": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "day": {
                          "type": "string",
                          "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                        },
                        "events": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "day",
                        "events"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "events",
                  "first_received_at",
                  "last_received_at",
                  "ingestion_batches",
                  "by_outcome",
                  "by_severity",
                  "daily"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "scoped_credentials": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "active": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "revoked": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "expired": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "today": {
                    "type": "object",
                    "properties": {
                      "day": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "events": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "calls": {
                        "type": "integer",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "day",
                      "events",
                      "calls"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "active",
                  "revoked",
                  "expired",
                  "today"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "audit": {
            "type": "object",
            "properties": {
              "total": {
                "type": "integer",
                "minimum": 0
              },
              "last_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "actions_last_30_days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string",
                      "minLength": 1
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "action",
                    "count"
                  ],
                  "additionalProperties": false
                }
              },
              "daily_last_30_days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "day",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "total",
              "last_at",
              "actions_last_30_days",
              "daily_last_30_days"
            ],
            "additionalProperties": false
          },
          "limits": {
            "type": "object",
            "properties": {
              "owned_workspaces": {
                "const": 25
              },
              "members_per_workspace": {
                "const": 250
              },
              "pending_invites": {
                "const": 100
              },
              "maximum_page": {
                "const": 200
              }
            },
            "required": [
              "owned_workspaces",
              "members_per_workspace",
              "pending_invites",
              "maximum_page"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private",
          "as_of",
          "period",
          "members",
          "invitations",
          "records",
          "ingestion_last_30_days",
          "scoped_credentials",
          "audit",
          "limits"
        ],
        "additionalProperties": false
      },
      "request_schema": null
    },
    {
      "operation_id": "operations_workspace_transfer",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          },
          "owner": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private",
          "owner"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "target_tenant_id": {
            "type": "string",
            "pattern": "^ten_[a-f0-9]{20}$"
          },
          "previous_owner_role": {
            "type": "string",
            "enum": [
              "admin",
              "operator",
              "reviewer",
              "viewer"
            ],
            "default": "admin"
          }
        },
        "required": [
          "target_tenant_id"
        ],
        "additionalProperties": true
      }
    },
    {
      "operation_id": "operations_workspace_update",
      "response_schema": {
        "type": "object",
        "properties": {
          "workspace": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "description": {
                "type": "string",
                "maxLength": 2000
              },
              "environment": {
                "type": "string",
                "enum": [
                  "live",
                  "sandbox"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "archived"
                ]
              },
              "created_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "archived_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "revision": {
                "type": "integer",
                "minimum": 1
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "environment",
              "status",
              "created_by",
              "created_at",
              "updated_at",
              "archived_at",
              "revision"
            ],
            "additionalProperties": false
          },
          "member": {
            "type": "object",
            "properties": {
              "workspace_id": {
                "type": "string",
                "pattern": "^opw_[a-f0-9]{24}$"
              },
              "tenant_id": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "operator",
                  "reviewer",
                  "viewer"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "removed"
                ]
              },
              "added_by": {
                "type": "string",
                "pattern": "^ten_[a-f0-9]{20}$"
              },
              "joined_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "removed_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "workspace_id",
              "tenant_id",
              "role",
              "status",
              "added_by",
              "joined_at",
              "updated_at",
              "removed_at"
            ],
            "additionalProperties": false
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "read",
                "write",
                "review",
                "manage",
                "admin"
              ]
            }
          },
          "private": {
            "const": true
          }
        },
        "required": [
          "workspace",
          "member",
          "capabilities",
          "private"
        ],
        "additionalProperties": false
      },
      "request_schema": {
        "type": "object",
        "properties": {
          "expected_revision": {
            "type": "integer",
            "minimum": 1,
            "description": "Optional concurrency guard. Supply the current revision to reject a stale change."
          },
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          }
        },
        "additionalProperties": true,
        "anyOf": [
          {
            "required": [
              "name"
            ]
          },
          {
            "required": [
              "description"
            ]
          }
        ]
      }
    }
  ],
  "downloads": {
    "python": "https://www.a2ally.com/sdks/a2ally_operations.py",
    "node": "https://www.a2ally.com/sdks/a2ally-operations.cjs",
    "activity_verifier": "https://www.a2ally.com/cli/verify-activity.cjs"
  }
}