"""Database infrastructure for CleverAgents.

Provides database models, repositories, unit of work, and session management.
"""

from .models import (
    ActionArgumentModel,
    ActionInvariantModel,
    Base,
    ChangeModel,
    ContextModel,
    LifecycleActionModel,
    LifecyclePlanModel,
    NamespacedProjectModel,
    PlanArgumentModel,
    PlanInvariantModel,
    PlanModel,
    PlanProjectModel,
    ProjectModel,
    ProjectResourceLinkModel,
    ResourceEdgeModel,
    ResourceLinkModel,
    ResourceModel,
    ResourceTypeModel,
    SessionMessageModel,
    SessionModel,
    SkillItemModel,
    SkillModel,
    ToolBindingModel,
    ToolModel,
    ToolResourceBindingModel,
    ValidationAttachmentModel,
    get_session,
    init_database,
)
from .repositories import (
    ActionInUseError,
    ActionRepository,
    ChangeRepository,
    ContextRepository,
    CycleDetectedError,
    DuplicateActionError,
    DuplicateLinkError,
    DuplicatePlanError,
    DuplicateResourceError,
    DuplicateResourceLinkError,
    DuplicateResourceTypeError,
    DuplicateSkillError,
    DuplicateToolError,
    DuplicateValidationAttachmentError,
    InvalidToolTypeError,
    LifecyclePlanRepository,
    LinkNotFoundError,
    NamespacedProjectRepository,
    PlanNotFoundError,
    PlanRepository,
    ProjectNotFoundError,
    ProjectRepository,
    ProjectResourceLinkRepository,
    ResourceHasEdgesError,
    ResourceNotFoundRepoError,
    ResourceRepository,
    ResourceTypeHasResourcesError,
    ResourceTypeNotFoundError,
    ResourceTypeRepository,
    SessionMessageRepository,
    SessionRepository,
    SkillInUseError,
    SkillNotFoundError,
    SkillRepository,
    ToolInUseError,
    ToolNotFoundError,
    ToolRegistryRepository,
    ToolRepository,
    TypeIncompatibleError,
    ValidationAttachmentRepository,
)
from .unit_of_work import UnitOfWork, UnitOfWorkContext

__all__ = [
    "ActionArgumentModel",
    "ActionInUseError",
    "ActionInvariantModel",
    "ActionRepository",
    "Base",
    "ChangeModel",
    "ChangeRepository",
    "ContextModel",
    "ContextRepository",
    "CycleDetectedError",
    "DuplicateActionError",
    "DuplicateLinkError",
    "DuplicatePlanError",
    "DuplicateResourceError",
    "DuplicateResourceLinkError",
    "DuplicateResourceTypeError",
    "DuplicateSkillError",
    "DuplicateToolError",
    "DuplicateValidationAttachmentError",
    "InvalidToolTypeError",
    "LifecycleActionModel",
    "LifecyclePlanModel",
    "LifecyclePlanRepository",
    "LinkNotFoundError",
    "NamespacedProjectModel",
    "NamespacedProjectRepository",
    "PlanArgumentModel",
    "PlanInvariantModel",
    "PlanModel",
    "PlanNotFoundError",
    "PlanProjectModel",
    "PlanRepository",
    "ProjectModel",
    "ProjectNotFoundError",
    "ProjectRepository",
    "ProjectResourceLinkModel",
    "ProjectResourceLinkRepository",
    "ResourceEdgeModel",
    "ResourceHasEdgesError",
    "ResourceLinkModel",
    "ResourceModel",
    "ResourceNotFoundRepoError",
    "ResourceRepository",
    "ResourceTypeHasResourcesError",
    "ResourceTypeModel",
    "ResourceTypeNotFoundError",
    "ResourceTypeRepository",
    "SessionMessageModel",
    "SessionMessageRepository",
    "SessionModel",
    "SessionRepository",
    "SkillInUseError",
    "SkillItemModel",
    "SkillModel",
    "SkillNotFoundError",
    "SkillRepository",
    "ToolBindingModel",
    "ToolInUseError",
    "ToolModel",
    "ToolNotFoundError",
    "ToolRegistryRepository",
    "ToolRepository",
    "ToolResourceBindingModel",
    "TypeIncompatibleError",
    "UnitOfWork",
    "UnitOfWorkContext",
    "ValidationAttachmentModel",
    "ValidationAttachmentRepository",
    "get_session",
    "init_database",
]
