"""
novyx-langchain: Persistent Memory for LangChain Agents
========================================================

Provides semantic memory storage and retrieval using Novyx Core API,
with built-in rollback, audit trail, and compliance-grade trace logging.

NEW in v2.0:
- Magic Rollback: Undo memory mistakes
- Cryptographic Audit Trail: SHA-256 hashing, tamper detection
- Trace Audit: Compliance-grade logging (Pro+)
- Unified API: All features in one SDK

Basic Usage:
    from novyx_langchain import NovyxMemory

    memory = NovyxMemory(
        api_key="nram_tenant_xxx",
        session_id="user-123"
    )

    # Use with LangChain
    chain = ConversationChain(llm=llm, memory=memory)

    # NEW: Rollback support
    memory.rollback("2 hours ago")

    # NEW: Audit trail
    audit = memory.audit(limit=50)

LangGraph Usage:
    from novyx_langchain import NovyxCheckpointer

    checkpointer = NovyxCheckpointer(api_key="nram_tenant_xxx")
    graph = workflow.compile(checkpointer=checkpointer)

    # NEW: Rollback checkpoints
    checkpointer.rollback_to_checkpoint(thread_id="conv-123", checkpoint_id="abc123")

Integrity-Protected Usage:
    from novyx_langchain import NovyxIntegrityMemory

    memory = NovyxIntegrityMemory(
        api_key="nram_tenant_xxx",
        session_id="user-123"
    )

    # Verify audit integrity
    verification = memory.verify_audit()

Compliance Mode (Pro+):
    from novyx_langchain import NovyxTracedMemory

    # Automatically traces all memory operations
    memory = NovyxTracedMemory(
        api_key="nram_tenant_xxx",
        session_id="user-123",
        agent_id="my-agent"
    )

    # All operations are RSA-signed and audited
    chain = ConversationChain(llm=llm, memory=memory)
"""

__version__ = "2.0.0"
__author__ = "Novyx Labs"

from novyx_langchain.memory import (
    NovyxMemory,
    NovyxChatMessageHistory,
    NovyxRAMClient,
)
from novyx_langchain.checkpointer import NovyxCheckpointer
from novyx_langchain.integrity import NovyxIntegrityMemory
from novyx_langchain.buffer import NovyxBufferedMemory
from novyx_langchain.traced_memory import NovyxTracedMemory

__all__ = [
    "NovyxMemory",
    "NovyxChatMessageHistory",
    "NovyxRAMClient",
    "NovyxCheckpointer",
    "NovyxIntegrityMemory",
    "NovyxBufferedMemory",
    "NovyxTracedMemory",
    "__version__",
]
