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,46 @@
|
||||
"""User commands and the intent-router decision object."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from app.report_collaboration.contracts.enums import CommandIntent, CommandScope, CommandStatus, ReportCostLevel
|
||||
from app.report_collaboration.contracts.requirements import ReportRequirementSnapshot
|
||||
|
||||
|
||||
class IntentDecision(BaseModel):
|
||||
"""Pydantic-constrained output of IntentRouterAgent. It never dispatches work."""
|
||||
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
intent: CommandIntent
|
||||
confidence: float = Field(ge=0, le=1)
|
||||
normalized_instruction: str
|
||||
scope: CommandScope
|
||||
requested_target_ids: list[str] = Field(default_factory=list)
|
||||
requirement_patch: ReportRequirementSnapshot | None = None
|
||||
requires_confirmation: bool = False
|
||||
cost_level: ReportCostLevel = "low"
|
||||
reason: str
|
||||
|
||||
|
||||
class CollaborationCommand(BaseModel):
|
||||
model_config = ConfigDict(extra="forbid")
|
||||
|
||||
command_id: str
|
||||
idempotency_key: str
|
||||
text: str
|
||||
intent: CommandIntent | None = None
|
||||
confidence: float | None = Field(default=None, ge=0, le=1)
|
||||
target_type: str | None = None
|
||||
target_ids: list[str] = Field(default_factory=list)
|
||||
normalized_instruction: str | None = None
|
||||
requires_confirmation: bool = False
|
||||
cost_level: ReportCostLevel | None = None
|
||||
reason: str | None = None
|
||||
impact_nodes: list[str] = Field(default_factory=list)
|
||||
status: CommandStatus
|
||||
expected_revision: int | None = None
|
||||
error: str | None = None
|
||||
created_at: str
|
||||
updated_at: str | None = None
|
||||
Reference in new issue
Block a user