feat(report-collaboration): complete RC-BE-015–018 backend, eval suite, and MySQL sync
Ship report rewrite/version APIs, security budget and audit persistence, AgentScope worker wiring, and the 20-task quality eval harness so the frontend can integrate against a stable contract once enabled in config. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
814a44f0b9
commit
5e953c9fcb
123 files changed
+26816
-3505
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""SSE / replay envelope. Wire names are camelCase; payloads stay snake_case."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from app.report_collaboration.contracts.enums import CollaborationEventType
|
||||
|
||||
|
||||
class CollaborationEventEnvelope(BaseModel):
|
||||
"""Durable event envelope consumed by the frontend reducer."""
|
||||
|
||||
model_config = ConfigDict(extra="forbid", populate_by_name=True)
|
||||
|
||||
event_id: str = Field(alias="eventId")
|
||||
session_id: str = Field(alias="sessionId")
|
||||
run_id: str | None = Field(default=None, alias="runId")
|
||||
seq: int = Field(ge=1)
|
||||
type: CollaborationEventType
|
||||
timestamp: str
|
||||
data: dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
def to_sse_dict(self) -> dict[str, Any]:
|
||||
return self.model_dump(by_alias=True, exclude_none=False)
|
||||
Reference in new issue
Block a user