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,199 @@
|
||||
"""Shared enumerations. Names and values match the frontend frozen contract."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Literal
|
||||
|
||||
ReportSessionStatus = Literal[
|
||||
"empty",
|
||||
"clarifying",
|
||||
"planning",
|
||||
"proposal_ready",
|
||||
"running",
|
||||
"awaiting_input",
|
||||
"reviewing",
|
||||
"completed",
|
||||
"failed",
|
||||
"cancelled",
|
||||
]
|
||||
|
||||
CollaborationMessageRole = Literal["human", "ai", "tool"]
|
||||
|
||||
MessageVisibility = Literal["visible", "internal"]
|
||||
|
||||
ReportPlanStatus = Literal[
|
||||
"proposed",
|
||||
"selected",
|
||||
"superseded",
|
||||
"rejected",
|
||||
"executing",
|
||||
"completed",
|
||||
]
|
||||
|
||||
ReportCostLevel = Literal["low", "medium", "high"]
|
||||
|
||||
CollaborationNodeStatus = Literal[
|
||||
"planned",
|
||||
"queued",
|
||||
"running",
|
||||
"validating",
|
||||
"completed",
|
||||
"failed",
|
||||
"awaiting_input",
|
||||
"cancel_requested",
|
||||
"cancelled",
|
||||
"superseded",
|
||||
"reopened",
|
||||
"interrupted",
|
||||
]
|
||||
|
||||
AgentRunStatus = Literal[
|
||||
"pending",
|
||||
"running",
|
||||
"waiting_input",
|
||||
"completed",
|
||||
"failed",
|
||||
"cancelled",
|
||||
]
|
||||
|
||||
ReportRunStatus = Literal[
|
||||
"queued",
|
||||
"planning",
|
||||
"running",
|
||||
"awaiting_input",
|
||||
"reviewing",
|
||||
"completed",
|
||||
"failed",
|
||||
"cancelled",
|
||||
"recovering",
|
||||
]
|
||||
|
||||
CommandIntent = Literal[
|
||||
"answer_question",
|
||||
"update_requirements",
|
||||
"add_angle",
|
||||
"research_again",
|
||||
"reanalyze",
|
||||
"rerun_node",
|
||||
"rewrite_section",
|
||||
"polish_report",
|
||||
"ask_report",
|
||||
"replan",
|
||||
"cancel",
|
||||
]
|
||||
|
||||
CommandStatus = Literal[
|
||||
"pending",
|
||||
"classified",
|
||||
"confirmation_required",
|
||||
"accepted",
|
||||
"accepted_waiting_boundary",
|
||||
"executing",
|
||||
"completed",
|
||||
"failed",
|
||||
"cancelled",
|
||||
"rejected",
|
||||
]
|
||||
|
||||
CommandScope = Literal["conversation", "node", "artifact_lineage", "section", "plan"]
|
||||
|
||||
ArtifactValidationStatus = Literal["pending", "validated", "rejected", "superseded"]
|
||||
|
||||
ArtifactType = Literal[
|
||||
"EvidenceBundle",
|
||||
"VerificationResult",
|
||||
"AngleAnalysis",
|
||||
"SynthesisOutline",
|
||||
"ReportSectionDraft",
|
||||
"ReviewDecision",
|
||||
"ReportVersion",
|
||||
"CoverageMatrix",
|
||||
]
|
||||
|
||||
ReportChangeType = Literal["initial", "section_rewrite", "polish", "restore", "revision"]
|
||||
|
||||
ReviewVerdict = Literal["pass", "revise"]
|
||||
|
||||
CollaborationEventType = Literal[
|
||||
"session.snapshot",
|
||||
"message.created",
|
||||
"message.delta",
|
||||
"message.completed",
|
||||
"tool_call.created",
|
||||
"tool_call.delta",
|
||||
"tool_call.completed",
|
||||
"tool_result.created",
|
||||
"tool_result.delta",
|
||||
"tool_result.completed",
|
||||
"team_message.created",
|
||||
"team_message.delta",
|
||||
"team_message.completed",
|
||||
"requirement.updated",
|
||||
"clarification.requested",
|
||||
"clarification.resolved",
|
||||
"plan.progress",
|
||||
"plan.proposed",
|
||||
"plan.selected",
|
||||
"run.status.changed",
|
||||
"node.created",
|
||||
"node.status.changed",
|
||||
"node.progress",
|
||||
"node.attempt.created",
|
||||
"artifact.created",
|
||||
"artifact.validated",
|
||||
"artifact.rejected",
|
||||
"source.added",
|
||||
"command.classified",
|
||||
"command.confirmation.required",
|
||||
"command.accepted",
|
||||
"command.completed",
|
||||
"command.failed",
|
||||
"command.cancelled",
|
||||
"report.delta",
|
||||
"report.version.created",
|
||||
"review.created",
|
||||
"error",
|
||||
"heartbeat",
|
||||
]
|
||||
|
||||
ALL_COLLABORATION_EVENT_TYPES: tuple[CollaborationEventType, ...] = (
|
||||
"session.snapshot",
|
||||
"message.created",
|
||||
"message.delta",
|
||||
"message.completed",
|
||||
"tool_call.created",
|
||||
"tool_call.delta",
|
||||
"tool_call.completed",
|
||||
"tool_result.created",
|
||||
"tool_result.delta",
|
||||
"tool_result.completed",
|
||||
"team_message.created",
|
||||
"team_message.delta",
|
||||
"team_message.completed",
|
||||
"requirement.updated",
|
||||
"clarification.requested",
|
||||
"clarification.resolved",
|
||||
"plan.progress",
|
||||
"plan.proposed",
|
||||
"plan.selected",
|
||||
"run.status.changed",
|
||||
"node.created",
|
||||
"node.status.changed",
|
||||
"node.progress",
|
||||
"node.attempt.created",
|
||||
"artifact.created",
|
||||
"artifact.validated",
|
||||
"artifact.rejected",
|
||||
"source.added",
|
||||
"command.classified",
|
||||
"command.confirmation.required",
|
||||
"command.accepted",
|
||||
"command.completed",
|
||||
"command.failed",
|
||||
"command.cancelled",
|
||||
"report.delta",
|
||||
"report.version.created",
|
||||
"review.created",
|
||||
"error",
|
||||
"heartbeat",
|
||||
)
|
||||
Reference in new issue
Block a user