"""
helix_cdc.gguf - GGUF Processing and Encoding
==============================================

Provides tools for:
- Scanning GGUF files for tensor metadata
- Extracting and dequantizing tensors
- Encoding tensors with SVD compression
- Layer-by-layer orchestration
- O(1) tensor index with JSON caching
- Comparing GGUF files for equivalence

Main classes:
- GGUFScanner: Scan and extract from GGUF files
- GGUFTensorIndex: O(1) tensor lookup with cache
- GGUFComparator: Compare two GGUF files tensor-by-tensor
- LayerEncoder: SVD-based tensor encoding
- GGUFOrchestrator: Full model encoding pipeline

Usage:
    from helix_cdc.gguf import GGUFTensorIndex, GGUFComparator

    # Index for fast tensor lookup
    index = GGUFTensorIndex.from_gguf("model.gguf")
    tensor = index.load_tensor("blk.0.attn_k.weight")

    # Compare two GGUF files
    comparator = GGUFComparator(abs_threshold=0.001)
    result = comparator.compare("baseline.gguf", "rebuilt.gguf")
    print(f"All pass: {result.all_pass}")
"""

from helix_cdc.gguf.scanner import GGUFScanner
from helix_cdc.gguf.encoder import LayerEncoder
from helix_cdc.gguf.orchestrator import GGUFOrchestrator
from helix_cdc.gguf.tensor_index import GGUFTensorIndex, build_tensor_index
from helix_cdc.gguf.comparator import GGUFComparator, GGUFComparisonResult
from helix_cdc.gguf.cache import get_scanner, clear_scanner_cache, get_cache_info

__all__ = [
    "GGUFScanner",
    "GGUFTensorIndex",
    "build_tensor_index",
    "GGUFComparator",
    "GGUFComparisonResult",
    "LayerEncoder",
    "GGUFOrchestrator",
    # Cache functions (WO-TOKENIZER-BRIDGE-01.1)
    "get_scanner",
    "clear_scanner_cache",
    "get_cache_info",
]
