from typing import Annotated, Literal, TypedDict from langgraph.graph.message import add_messages class InterviewState(TypedDict): # Static — set once at session start topic_name: str session_id: str student_id: str questions_remaining: list[dict] # [{"question_text": str, "difficulty": str}] past_best_score: int | None past_weak_areas: list[str] # Dynamic — mutates during session messages: Annotated[list, add_messages] # appended via reducer conversation_summary: str questions_asked: list[str] student_weak_areas: list[str] turn_count: int awaiting_counter_response: bool counter_questions_asked: int # global cap — max 2 per interview last_verdict: str | None # "strong" | "shallow" | "wrong" | None # Terminal — set once at end status: Literal["active", "complete"] score: int | None feedback: dict | None