"""
{{ display_name }} - State definition.

This module defines the state schema for the AI analysis workflow.
"""

from typing import Annotated, Optional

from torivers_sdk.automation import BaseState, merge_dict, merge_list


class {{ class_name }}State(BaseState):
    """State for {{ display_name }} AI analysis.

    Attributes:
        content: Input content to analyze.
        analysis_type: Type of analysis to perform.
        summary: Generated content summary.
        sentiment: Sentiment analysis results.
        entities: Extracted entities.
        insights: Key insights from content.
    """

    # Input fields
    content: Optional[str] = None
    analysis_type: str = "comprehensive"
    options: Annotated[dict, merge_dict] = {}

    # Analysis results
    summary: Optional[str] = None
    sentiment: Annotated[dict, merge_dict] = {}
    topics: Annotated[list, merge_list] = []
    entities: Annotated[list, merge_list] = []
    insights: Annotated[list, merge_list] = []

    # Token tracking
    total_tokens_used: int = 0

    # Accumulated metadata
    metadata: Annotated[dict, merge_dict] = {}
