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:
董宏凯andCursor committed 2026-09-06 17:32:15 +08:00
1 parent 814a44f0b9
commit 5e953c9fcb
123 files changed
+26816 -3505

No files matched your search

@@ -0,0 +1,26 @@
"""Stable identifiers shared with the frontend canvas and SSE payloads."""
from __future__ import annotations
import re
_NODE_RUN_ID_RE = re.compile(r"^(?P<node_id>.+)-attempt(?P<attempt>\d+)$")
def make_node_run_id(node_id: str, attempt: int) -> str:
"""Return ``${node_id}-attempt{attempt}``. Random UUIDs are forbidden."""
if not node_id or node_id.strip() != node_id:
raise ValueError("node_id must be a non-empty trimmed string")
if attempt < 1:
raise ValueError("attempt must be >= 1")
return f"{node_id}-attempt{attempt}"
def parse_node_run_id(node_run_id: str) -> tuple[str, int]:
"""Split a canonical node_run_id back into ``(node_id, attempt)``."""
match = _NODE_RUN_ID_RE.match(node_run_id or "")
if match is None:
raise ValueError(f"invalid node_run_id: {node_run_id!r}")
return match.group("node_id"), int(match.group("attempt"))