from .async_provider import make_checkpointer
from .provider import checkpointer_context, get_checkpointer, reset_checkpointer

__all__ = [
    "get_checkpointer",
    "reset_checkpointer",
    "checkpointer_context",
    "make_checkpointer",
]

# Lazy-import shallow savers so the module is still importable without
# langgraph-checkpoint-sqlite installed.
def __getattr__(name: str):
    if name == "AsyncShallowSqliteSaver":
        from .shallow_sqlite import _make_async_shallow_saver
        return _make_async_shallow_saver()
    if name == "ShallowSqliteSaver":
        from .shallow_sqlite import _make_sync_shallow_saver
        return _make_sync_shallow_saver()
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
