"""
SparkAI Agent Package
"""

from sparkai.agent.base import SparkAgent, AgentCapability, AgentState, AgentTask, AgentMessage, AgentRole, ExecutionPlan
from sparkai.agent.llm import LLMProvider, LLMConfig
from sparkai.agent.memory import AgentMemory, MemoryType, MemoryEntry
from sparkai.agent.toolkit import (
    ToolRegistry, Tool, ToolParameter, Toolset, ToolsetRegistry,
    create_engine_tools, create_engine_toolset, create_asset_toolset,
    create_npc_toolset, create_narrative_toolset, create_gameplay_toolset,
    create_code_toolset, create_workflow_toolset, create_testing_toolset,
    create_orchestration_toolset, create_audio_toolset, create_video_toolset,
    get_toolsets_for_role, get_tools_for_role,
)
from sparkai.agent.orchestrator import AgentOrchestrator
from sparkai.agent.skills.base import Skill, SkillRegistry
from sparkai.agent.skills.template import TemplateSkill, TemplateLibrary, GameTemplate
from sparkai.agent.skills.debug import DebugSkill, DebugProtocol, DebugEntry
from sparkai.agent.studio.directors import CreativeDirector, TechnicalDirector, Producer
from sparkai.agent.studio.leads import GameDesigner, LeadProgrammer, ArtDirector, NarrativeDirector, QALead
from sparkai.agent.studio.specialists import (
    GameplayProgrammer, EngineProgrammer, AIProgrammer,
    LevelDesigner, WorldBuilder, SoundDesigner, Writer, QATester,
)
from sparkai.agent.hooks import HookManager, Hook, HookEvent, HookResult
from sparkai.agent.rules import RuleEngine, Rule, RuleScope, RuleSeverity, RuleViolation
from sparkai.agent.team_orch import TeamOrchestrator, Team, TeamType, TeamConfig
from sparkai.agent.bench import GameBench, BenchResult, BenchDimension
from sparkai.agent.session import SessionManager, AgentSession, SessionState
from sparkai.agent.loop import AgentLoop, Pipeline, ReasoningChain, LoopState, LoopIteration
from sparkai.agent.commands import SlashCommand, CommandRegistry, CommandCategory
from sparkai.agent.memory_v2 import AgentMemorySystem, MemoryLayer, MemoryLayerStore
from sparkai.agent.events import EventBus, Event, EventChannel, Subscription
from sparkai.agent.context import (
    GameContext, GameGenre, PipelinePhase, AssetType,
    EntityRecord, SceneRecord, AssetRecord, PipelineState,
    WorldModel, ContextSnapshot,
)
from sparkai.agent.llm_router import LLMRouter, TaskType, ProviderCapability, ProviderProfile, RoutingDecision
from sparkai.agent.executor import ToolExecutor, ExecutionResult, ExecutionStatus, ChainStep, ChainResult
from sparkai.agent.runtime import AgentRuntime, RuntimeState, RuntimeConfig
from sparkai.agent.protocol import (
    AgentProtocol, ProtocolMessage, MessageType, MessagePriority,
    DeliveryStatus, Conversation, DeliveryReceipt, MessageRouter,
)
from sparkai.agent.skill_forge import (
    SkillForge, SkillBlueprint, SkillEvolution, SkillMaturity,
    ComposedSkill, ForgeOperation,
)
from sparkai.agent.mesh import (
    AgentMesh, AgentNode, Connection, Cluster,
    NodeState, ConnectionType, ClusterState,
)
from sparkai.agent.health import (
    HealthChecker, HealthReport, HealthStatus, CheckResult, CheckCategory,
)
from sparkai.agent.game_coder import (
    GameCoder, CodeGenProject, CodeGenPhase, CodeFile,
    PromptAnalysis, ValidationResult, ValidationLevel,
    CodeLanguage, GameFeature,
    get_game_coder,
)
from sparkai.agent.world_builder import (
    WorldBuilder as WorldBuilderAgent,
    WorldData, WorldPhase, TerrainData, TerrainTile,
    EnvironmentData, StructurePlacement, EntityPlacement,
    BiomeType, StructureType, WeatherType, TimeOfDay,
    get_world_builder,
)
from sparkai.agent.game_skill import (
    GameSkillSystem, TemplateEntry, DebugEntry,
    TemplateCategory, DebugSeverity, FixStatus,
    ComposedSkill, EvolutionAction,
    get_game_skill_system,
)
from sparkai.agent.quality_gate import (
    QualityGateSystem, GateDefinition, GateResult, GateCheck,
    GateVerdict, GateCategory, GateSeverity, QualityReport,
    get_quality_gate_system,
)
from sparkai.agent.workflow_skills import (
    WorkflowSkillSystem, WorkflowSkill, WorkflowStep,
    WorkflowCategory, WorkflowExecution,
    get_workflow_skill_system,
)
from sparkai.agent.agent_session import (
    AgentSessionManager, AgentSessionV2, ConversationThread,
    ConversationMessage, SessionCheckpoint, SessionState,
    MessageRole, CheckpointType,
    get_agent_session_manager,
)
from sparkai.agent.game_pipeline import (
    GamePipelineSystem, PipelineRun, PipelineStage,
    StageStatus, EvalScore, EvalDimension,
    get_game_pipeline_system,
)
from sparkai.agent.studio_coordinator import (
    StudioCoordinator, StudioAgent, StudioTask,
    AgentTier, Department, TaskPriority, CoordinationType,
    get_studio_coordinator,
)
from sparkai.agent.agent_swarm import (
    AgentSwarm, SwarmNode, SwarmTask, SwarmRole, SwarmState,
    ConsensusEngine, ConsensusType, ConsensusResult,
    SwarmMemory, DecompositionStrategy,
    get_agent_swarm,
)
from sparkai.agent.studio_command import (
    StudioCommandSystem, StudioCommandDef, CommandCategory,
    CommandExecution,
    get_studio_command_system,
)
from sparkai.agent.game_template import (
    GameTemplateLibrary, GenreTemplate, GameGenre, TemplateMaturity,
    FileTemplate, EntityTemplate, SystemTemplate, ScaffoldResult,
    get_game_template_library,
)
from sparkai.agent.agent_blueprint import (
    BlueprintEngine, GameBlueprint, CoreLoop, MechanicSpec,
    ProgressionModel, AestheticDirection, BlueprintRevision,
    BlueprintState, MechanicType, ProgressionType, AestheticPillar,
    get_blueprint_engine,
)
from sparkai.agent.agent_playtest import (
    PlaytestEngine, PlaytestSession, TestScenario, PlaytestReport,
    PlaytestStatus, ScenarioType, MetricType, Severity,
    get_playtest_engine,
)
from sparkai.agent.agent_composer import (
    ComposerEngine, Composition, CompositionTask, DataChannel,
    CompositionPlan, CompositionResult, CompositionState, TaskType,
    get_composer_engine,
)
from sparkai.agent.agent_knowledge import (
    KnowledgeGraph, KnowledgeNode, KnowledgeRelation, KnowledgeDomain,
    RelationType, NodeConfidence, DesignPattern, PatternCategory,
    InferenceEngine, InferenceResult, ContextRetriever,
    get_knowledge_graph,
)
from sparkai.agent.agent_toolchain import (
    ToolChainEngine, ToolChain, ChainStep, ChainStatus, StepStatus,
    StepType, ChainTemplate, TemplateCategory, DependencyResolver,
    ParallelExecutor,
    get_toolchain_engine,
)
from sparkai.agent.agent_reflex import (
    ReflexEngine, MetricSample, MetricType, Anomaly, AnomalyType,
    SeverityLevel, OptimizationSuggestion, TuningAction, ReflexReport,
    ReportStatus, MetricCollector, AnomalyDetector, OptimizationAdvisor,
    AdaptiveTuner,
    get_reflex_engine,
)
from sparkai.agent.agent_dialogue import (
    DialogueEngine, DialogueTree, DialogueNode, DialogueChoice,
    DialogueCondition, DialogueAction, DialogueVariable, DialogueType,
    NodeType, MoodType, NarrativeArc, ArcStatus, ConditionOp,
    get_dialogue_engine,
)
from sparkai.agent.agent_asset import (
    AssetPipelineEngine, AssetRecord, AssetCollection, AssetPipeline,
    AssetCategory, AssetFormat, AssetStatus, PipelineStepType,
    get_asset_engine,
)
from sparkai.agent.agent_validator import (
    ValidatorEngine, ValidationRule, ValidationReport, ValidationIssue,
    ValidationCategory, ValidationSeverity, RuleScope, FixType,
    AutoFixer, RuleSet,
    get_validator_engine,
)
from sparkai.agent.agent_orchestrator import (
    OrchestratorEngine, AgentDescriptor, OrchestratedTask,
    AgentChannel, WorkflowPlan, RoutingStrategy,
    AgentRole as OrchAgentRole, AgentCapability as OrchAgentCapability,
    TaskPriority, TaskStatus, WorkflowState, ChannelType,
    get_orchestrator_engine,
)
from sparkai.agent.agent_skill_evolution import (
    SkillEvolutionEngine, SkillTemplate, DebugProtocol,
    SkillExecution, EvolutionCycle,
    SkillDomain, SkillMaturity as EvolSkillMaturity,
    ExecutionOutcome, FixStatus as EvolFixStatus, EvolutionType,
    get_skill_evolution_engine,
)
from sparkai.agent.agent_evaluator import (
    GameEvaluatorEngine, EvaluationMetric, EvaluationReport,
    EvaluationBenchmark,
    EvalDimension, MetricType as EvalMetricType,
    ReportStatus, SeverityLevel as EvalSeverityLevel,
    get_game_evaluator,
)
from sparkai.agent.agent_lifecycle import (
    AgentLifecycleManager, AgentBlueprint, LifecyclePhase,
    BlueprintTier, ReflectionVerdict, VerificationConfidence,
    PlanStep, ExecutionPlan as LifecyclePlan, ReflectionResult,
    VerificationResult, LifecycleEvent,
)
from sparkai.agent.agent_slash_commands import (
    SlashCommandSystem, SlashCommand, CommandCategory,
    CommandScope, CommandResult, CommandParam,
)
from sparkai.agent.agent_validation_hooks import (
    ValidationHooksSystem, HookRule, HookPhase,
    HookAction, HookSeverity, HookResult as ValidationHookResult,
    HookCondition, HookExecution,
)
from sparkai.agent.agent_task_executor import (
    TaskExecutionEngine, TaskExecution, ExecutionStrategy,
    TaskContext, ExecutionBatch, ExecutionStatus as TaskExecutionStatus,
)
from sparkai.agent.agent_integration import (
    SubsystemIntegration, IntegrationChannel, IntegrationEvent,
    IntegrationEntry,
)

__all__ = [
    "SparkAgent",
    "AgentCapability",
    "AgentState",
    "AgentTask",
    "AgentMessage",
    "AgentRole",
    "ExecutionPlan",
    "LLMProvider",
    "LLMConfig",
    "AgentMemory",
    "MemoryType",
    "MemoryEntry",
    "ToolRegistry",
    "Tool",
    "ToolParameter",
    "Toolset",
    "ToolsetRegistry",
    "create_engine_tools",
    "create_engine_toolset",
    "create_asset_toolset",
    "create_npc_toolset",
    "create_narrative_toolset",
    "create_gameplay_toolset",
    "create_code_toolset",
    "create_workflow_toolset",
    "create_testing_toolset",
    "create_orchestration_toolset",
    "create_audio_toolset",
    "create_video_toolset",
    "get_toolsets_for_role",
    "get_tools_for_role",
    "AgentOrchestrator",
    "Skill",
    "SkillRegistry",
    "TemplateSkill",
    "TemplateLibrary",
    "GameTemplate",
    "DebugSkill",
    "DebugProtocol",
    "DebugEntry",
    "CreativeDirector",
    "TechnicalDirector",
    "Producer",
    "GameDesigner",
    "LeadProgrammer",
    "ArtDirector",
    "NarrativeDirector",
    "QALead",
    "GameplayProgrammer",
    "EngineProgrammer",
    "AIProgrammer",
    "LevelDesigner",
    "WorldBuilder",
    "SoundDesigner",
    "Writer",
    "QATester",
    "HookManager",
    "Hook",
    "HookEvent",
    "HookResult",
    "RuleEngine",
    "Rule",
    "RuleScope",
    "RuleSeverity",
    "RuleViolation",
    "TeamOrchestrator",
    "Team",
    "TeamType",
    "TeamConfig",
    "GameBench",
    "BenchResult",
    "BenchDimension",
    "SessionManager",
    "AgentSession",
    "SessionState",
    "AgentLoop",
    "Pipeline",
    "ReasoningChain",
    "LoopState",
    "LoopIteration",
    "SlashCommand",
    "CommandRegistry",
    "CommandCategory",
    "AgentMemorySystem",
    "MemoryLayer",
    "MemoryLayerStore",
    "EventBus",
    "Event",
    "EventChannel",
    "Subscription",
    "GameContext",
    "GameGenre",
    "PipelinePhase",
    "AssetType",
    "EntityRecord",
    "SceneRecord",
    "AssetRecord",
    "PipelineState",
    "WorldModel",
    "ContextSnapshot",
    "LLMRouter",
    "TaskType",
    "ProviderCapability",
    "ProviderProfile",
    "RoutingDecision",
    "ToolExecutor",
    "ExecutionResult",
    "ExecutionStatus",
    "ChainStep",
    "ChainResult",
    "AgentRuntime",
    "RuntimeState",
    "RuntimeConfig",
    "AgentProtocol",
    "ProtocolMessage",
    "MessageType",
    "MessagePriority",
    "DeliveryStatus",
    "Conversation",
    "DeliveryReceipt",
    "MessageRouter",
    "SkillForge",
    "SkillBlueprint",
    "SkillEvolution",
    "SkillMaturity",
    "ComposedSkill",
    "ForgeOperation",
    "AgentMesh",
    "AgentNode",
    "Connection",
    "Cluster",
    "NodeState",
    "ConnectionType",
    "ClusterState",
    "HealthChecker",
    "HealthReport",
    "HealthStatus",
    "CheckResult",
    "CheckCategory",
    "GameCoder",
    "CodeGenProject",
    "CodeGenPhase",
    "CodeFile",
    "PromptAnalysis",
    "ValidationResult",
    "ValidationLevel",
    "CodeLanguage",
    "GameFeature",
    "get_game_coder",
    "WorldBuilderAgent",
    "WorldData",
    "WorldPhase",
    "TerrainData",
    "TerrainTile",
    "EnvironmentData",
    "StructurePlacement",
    "EntityPlacement",
    "BiomeType",
    "StructureType",
    "WeatherType",
    "TimeOfDay",
    "get_world_builder",
    "GameSkillSystem",
    "TemplateEntry",
    "DebugEntry",
    "TemplateCategory",
    "DebugSeverity",
    "FixStatus",
    "ComposedSkill",
    "EvolutionAction",
    "get_game_skill_system",
    "QualityGateSystem",
    "GateDefinition",
    "GateResult",
    "GateCheck",
    "GateVerdict",
    "GateCategory",
    "GateSeverity",
    "QualityReport",
    "get_quality_gate_system",
    "WorkflowSkillSystem",
    "WorkflowSkill",
    "WorkflowStep",
    "WorkflowCategory",
    "WorkflowExecution",
    "get_workflow_skill_system",
    "AgentSessionManager",
    "AgentSessionV2",
    "ConversationThread",
    "ConversationMessage",
    "SessionCheckpoint",
    "SessionState",
    "MessageRole",
    "CheckpointType",
    "get_agent_session_manager",
    "GamePipelineSystem",
    "PipelineRun",
    "PipelineStage",
    "StageStatus",
    "EvalScore",
    "EvalDimension",
    "get_game_pipeline_system",
    "StudioCoordinator",
    "StudioAgent",
    "StudioTask",
    "AgentTier",
    "Department",
    "TaskPriority",
    "CoordinationType",
    "get_studio_coordinator",
    "AgentSwarm",
    "SwarmNode",
    "SwarmTask",
    "SwarmRole",
    "SwarmState",
    "ConsensusEngine",
    "ConsensusType",
    "ConsensusResult",
    "SwarmMemory",
    "DecompositionStrategy",
    "get_agent_swarm",
    "StudioCommandSystem",
    "StudioCommandDef",
    "CommandCategory",
    "CommandExecution",
    "get_studio_command_system",
    "GameTemplateLibrary",
    "GenreTemplate",
    "GameGenre",
    "TemplateMaturity",
    "FileTemplate",
    "EntityTemplate",
    "SystemTemplate",
    "ScaffoldResult",
    "get_game_template_library",
    "BlueprintEngine",
    "GameBlueprint",
    "CoreLoop",
    "MechanicSpec",
    "ProgressionModel",
    "AestheticDirection",
    "BlueprintRevision",
    "BlueprintState",
    "MechanicType",
    "ProgressionType",
    "AestheticPillar",
    "get_blueprint_engine",
    "PlaytestEngine",
    "PlaytestSession",
    "TestScenario",
    "PlaytestReport",
    "PlaytestStatus",
    "ScenarioType",
    "MetricType",
    "Severity",
    "get_playtest_engine",
    "ComposerEngine",
    "Composition",
    "CompositionTask",
    "DataChannel",
    "CompositionPlan",
    "CompositionResult",
    "CompositionState",
    "TaskType",
    "get_composer_engine",
    "KnowledgeGraph",
    "KnowledgeNode",
    "KnowledgeRelation",
    "KnowledgeDomain",
    "RelationType",
    "NodeConfidence",
    "DesignPattern",
    "PatternCategory",
    "InferenceEngine",
    "InferenceResult",
    "ContextRetriever",
    "get_knowledge_graph",
    "ToolChainEngine",
    "ToolChain",
    "ChainStep",
    "ChainStatus",
    "StepStatus",
    "StepType",
    "ChainTemplate",
    "TemplateCategory",
    "DependencyResolver",
    "ParallelExecutor",
    "get_toolchain_engine",
    "ReflexEngine",
    "MetricSample",
    "MetricType",
    "Anomaly",
    "AnomalyType",
    "SeverityLevel",
    "OptimizationSuggestion",
    "TuningAction",
    "ReflexReport",
    "ReportStatus",
    "MetricCollector",
    "AnomalyDetector",
    "OptimizationAdvisor",
    "AdaptiveTuner",
    "get_reflex_engine",
    "DialogueEngine",
    "DialogueTree",
    "DialogueNode",
    "DialogueChoice",
    "DialogueCondition",
    "DialogueAction",
    "DialogueVariable",
    "DialogueType",
    "NodeType",
    "MoodType",
    "NarrativeArc",
    "ArcStatus",
    "ConditionOp",
    "get_dialogue_engine",
    "AssetPipelineEngine",
    "AssetRecord",
    "AssetCollection",
    "AssetPipeline",
    "AssetCategory",
    "AssetFormat",
    "AssetStatus",
    "PipelineStepType",
    "get_asset_engine",
    "ValidatorEngine",
    "ValidationRule",
    "ValidationReport",
    "ValidationIssue",
    "ValidationCategory",
    "ValidationSeverity",
    "RuleScope",
    "FixType",
    "AutoFixer",
    "RuleSet",
    "get_validator_engine",
    "OrchestratorEngine",
    "AgentDescriptor",
    "OrchestratedTask",
    "AgentChannel",
    "WorkflowPlan",
    "RoutingStrategy",
    "OrchAgentRole",
    "OrchAgentCapability",
    "TaskPriority",
    "TaskStatus",
    "WorkflowState",
    "ChannelType",
    "get_orchestrator_engine",
    "SkillEvolutionEngine",
    "SkillTemplate",
    "DebugProtocol",
    "SkillExecution",
    "EvolutionCycle",
    "SkillDomain",
    "EvolSkillMaturity",
    "ExecutionOutcome",
    "EvolFixStatus",
    "EvolutionType",
    "get_skill_evolution_engine",
    "GameEvaluatorEngine",
    "EvaluationMetric",
    "EvaluationReport",
    "EvaluationBenchmark",
    "EvalDimension",
    "EvalMetricType",
    "ReportStatus",
    "EvalSeverityLevel",
    "get_game_evaluator",
]
