"""
Agent Runtime Context
"""
from pathlib import Path
from dataclasses import dataclass, field
from typing import Optional, Dict, Any, List
from .skill_loader import SkillLoader


@dataclass
class SkillAgentContext:
    """Agent 运行时上下文"""
    skill_loader: SkillLoader
    working_directory: Path = field(default_factory=Path.cwd)

    # 项目上下文（可选）
    project_id: Optional[str] = None
    project_name: Optional[str] = None
    project_genre: Optional[str] = None
    total_episodes: Optional[int] = None

    # 全局设定
    world_setting: Optional[str] = None
    characters: Optional[str] = None
    overall_outline: Optional[str] = None

    # 创作方式
    creation_mode: Optional[str] = None  # 'script' or 'inspiration'
    source_content: Optional[str] = None  # 剧本或灵感内容

    # 当前活跃剧集
    active_episode_number: Optional[int] = None
    active_episode_title: Optional[str] = None

    # 所有剧集摘要
    episodes: List[Dict[str, Any]] = field(default_factory=list)

    # 用户配置的 Skills
    user_skills: List[Dict[str, Any]] = field(default_factory=list)
