"""
Core infrastructure modules for MarkiTect.

This package contains the fundamental building blocks:
- Parser: Markdown to AST conversion
- Serializer: AST to Markdown serialization
- DocumentManager: Document ingestion and management
- Workspace: Workspace and project management
"""

from .parser import parse_markdown_to_ast
from .section_tree import build_section_tree, extract_section_text
from .serializer import ASTSerializer
from .document_manager import DocumentManager, CleanDocumentManager
from .workspace import (
    WorkspaceManager,
    WorkspaceTemplate,
    TemplateMetadata,
    TemplateResult,
    WorkspaceCreationResult,
    ProjectResult,
    SyncResult,
    BackupResult,
    RestoreResult,
    WorkspaceState,
    ConflictInfo,
    MergeResult,
)

__all__ = [
    # Parser
    "parse_markdown_to_ast",
    # Section tree
    "build_section_tree",
    "extract_section_text",
    # Serializer
    "ASTSerializer",
    # Document Manager
    "DocumentManager",
    "CleanDocumentManager",
    # Workspace
    "WorkspaceManager",
    "WorkspaceTemplate",
    "TemplateMetadata",
    "TemplateResult",
    "WorkspaceCreationResult",
    "ProjectResult",
    "SyncResult",
    "BackupResult",
    "RestoreResult",
    "WorkspaceState",
    "ConflictInfo",
    "MergeResult",
]
