from __future__ import annotations

from dataclasses import dataclass
from typing import Any

from app.modules.api.domain.models.agent_request import AgentRequest
from app.modules.api.domain.models.agent_session import AgentSession
from app.modules.api.infrastructure.logging.request_trace_logger import RequestTraceLogger
from app.modules.agent.observability.module_trace import RequestTraceContext
from app.modules.agent.orchestration.messaging.client_message_publisher import ClientMessagePublisher


@dataclass(slots=True)
class ExecutionContext:
    request: AgentRequest
    session: AgentSession
    publisher: ClientMessagePublisher
    trace_logger: RequestTraceLogger
    trace: RequestTraceContext
    task_context: Any = None
    route_result: Any = None
    workflow_result: Any = None
