feat(agent_assets): 添加规则版本送审时的命名副本创建逻辑

当提交的版本与当前工作版本不同时,自动创建命名副本:
- 新增 _create_named_working_copy_for_review 方法处理送审时的版本复制
- 支持将工作版本快照复制为指定版本进行送审
- 新增 AgentAssetSpreadsheetChangeRecordRead schema
- API 端点新增 /rules/{id}/spreadsheet-versions/{version}/change-records 接口
This commit is contained in:
caoxiaozhu
2026-05-18 09:42:23 +00:00
parent 64ec27949f
commit 5106d286a1
7 changed files with 1039 additions and 72 deletions

View File

@@ -128,6 +128,16 @@ class AgentAssetVersionCompareRead(BaseModel):
cell_changes: list[AgentAssetSpreadsheetDiffCellRead] = Field(default_factory=list)
class AgentAssetSpreadsheetChangeRecordRead(BaseModel):
actor: str
changed_at: datetime
summary: str
sheet_changes: list[AgentAssetSpreadsheetDiffSheetRead] = Field(default_factory=list)
cell_changes: list[AgentAssetSpreadsheetDiffCellRead] = Field(default_factory=list)
changed_sheet_count: int = 0
changed_cell_count: int = 0
class AgentAssetVersionRead(BaseModel):
model_config = ConfigDict(from_attributes=True)