Files
2026-08-21 16:00:13 +08:00

36 lines
1.2 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""演化候选 API schema(契约字典 §12;api-spec 演化候选审核)。"""
from datetime import datetime
from typing import Any
from pydantic import Field
from app.schemas.common import OrmModel
class EvolutionCandidateResponse(OrmModel):
"""演化候选响应(delta/evidence_ids 已从 JSON 文本解析)。"""
id: str = Field(description="演化候选 ID(evolution_ 前缀)")
character_id: str
cycle_id: str = Field(description="触发本次的大周天循环 ID")
type: str = Field(description="候选类型,取值见契约字典 §12.1")
source: str = Field(description="来源,本期 big_cycle")
level: str = Field(description="影响层级 L0-L4")
scope: str = Field(description="作用域,取值见契约字典 §12.3")
title: str
proposal: str
delta: dict[str, Any] = Field(default_factory=dict, description="演化增量")
evidence_ids: list[str] = Field(default_factory=list)
confidence: float
benefit_score: float
risk_score: float
drift_score: float
auto_apply_allowed: bool
status: str
resulting_target_id: str | None = None
error_message: str | None = None
reviewed_at: datetime | None = None
reviewed_by: str
created_at: datetime