"""관리자 감정 관측 조회 API 계약.""" from __future__ import annotations from datetime import datetime from pydantic import BaseModel, ConfigDict, Field from .client_affect import ClientAffectTraceV1 class AdminAffectRuntimeResponse(BaseModel): model_config = ConfigDict(extra="forbid", protected_namespaces=()) enabled: bool provider: str model: str configured: bool class AdminAffectSessionSummary(BaseModel): model_config = ConfigDict(extra="forbid", protected_namespaces=()) session_id: str persona_code: str started_at: datetime ended: bool trace_count: int = Field(ge=0) class AdminAffectSessionListResponse(BaseModel): model_config = ConfigDict(extra="forbid", protected_namespaces=()) runtime: AdminAffectRuntimeResponse sessions: list[AdminAffectSessionSummary] total: int = Field(ge=0) limit: int = Field(ge=1, le=100) offset: int = Field(ge=0) class AdminAffectTraceRecord(BaseModel): model_config = ConfigDict(extra="forbid", protected_namespaces=()) turn_id: str seq: int = Field(ge=1) created_at: datetime trace: ClientAffectTraceV1 class AdminAffectSessionDetailResponse(BaseModel): model_config = ConfigDict(extra="forbid", protected_namespaces=()) session_id: str persona_code: str current_emotions: dict[str, float | None] traces: list[AdminAffectTraceRecord] total_traces: int = Field(ge=0) has_more: bool