"""Core types package - Layer 0 (no internal dependencies).

This package contains pure data types that can be imported by any module
without risk of circular imports. All types here depend only on:
- Standard library
- pydantic

Usage:
    from core.types import AgentDefinition, ExecutionBudget
    from core.types.enums import MessageRole, AttachmentType
"""

from core.pathways.models.tool import (
    ParameterProperty,
    ToolArgValue,
    ToolCall,
    ToolCallPlan,
    ToolCallRecord,
    ToolExecutionResult,
    ToolFunction,
    ToolOutput,
    ToolOutputMetadata,
    ToolParameters,
    ToolResult,
    ToolSchema,
)
from core.types.agents import (
    AgentDefinition,
    ModelRouting,
)
from core.types.enums import (
    AttachmentType,
    MessageRole,
)
from core.types.execution import (
    ExecutionBudget,
    LoopResult,
    StepFailure,
    StepOutcome,
    StepOutputValue,
    StepSkipped,
    StepSuccess,
    count_failures,
    get_last_error,
    is_step_successful,
)
from core.types.llm import (
    LLMEmbedResult,
    LLMFunctionParameters,
    LLMFunctionSpec,
    LLMGenerateResult,
    LLMMessage,
    LLMParameterProperty,
    LLMRequest,
    LLMResponse,
    LLMToolCall,
    LLMToolCallFunction,
    LLMToolSpec,
    ToolChoice,
    ToolChoiceFunction,
    ToolChoiceObject,
)
from core.types.messages import (
    Attachment,
    ConversationMessage,
    FunctionCall,
    MessageValue,
    ToolCallMessage,
)
from core.types.state import (
    JSONValue,
    JsonValue,
    ThreadState,
)

__all__ = [
    # Agent types
    "AgentDefinition",
    # Message types
    "Attachment",
    # Enums
    "AttachmentType",
    "ConversationMessage",
    # Execution types
    "ExecutionBudget",
    "FunctionCall",
    # State types
    "JSONValue",
    "JsonValue",  # Backwards-compatible alias for JSONValue
    # LLM types
    "LLMEmbedResult",
    "LLMFunctionParameters",
    "LLMFunctionSpec",
    "LLMGenerateResult",
    "LLMMessage",
    "LLMParameterProperty",
    "LLMRequest",
    "LLMResponse",
    "LLMToolCall",
    "LLMToolCallFunction",
    "LLMToolSpec",
    "LoopResult",
    "MessageRole",
    "MessageValue",
    "ModelRouting",
    # Tool types
    "ParameterProperty",
    "StepFailure",
    "StepOutcome",
    "StepOutputValue",
    "StepSkipped",
    "StepSuccess",
    "ThreadState",
    "ToolArgValue",
    "ToolCall",
    "ToolCallMessage",
    "ToolCallPlan",
    "ToolCallRecord",
    "ToolChoice",
    "ToolChoiceFunction",
    "ToolChoiceObject",
    "ToolExecutionResult",
    "ToolFunction",
    "ToolOutput",
    "ToolOutputMetadata",
    "ToolParameters",
    "ToolResult",
    "ToolSchema",
    "count_failures",
    "get_last_error",
    "is_step_successful",
]
