"""
Utility and Helper Components
============================

This package provides utility functions, helper classes, and common tools used
throughout the MIRA memory system. It includes logging setup, file operations,
data processing utilities, and memory integration helpers.

Components:
    - utils.py: Main utility functions and helpers
    - auto_memvid_builder.py: Automated memory video building
    - ultimate_memory_integration.py: Legacy memory system integration

Common Functions:
    - setup_logging(): Configure logging for MIRA components
    - File operations and path utilities
    - Data validation and processing helpers
    - Memory system integration utilities

Usage:
    ```python
    from utils import setup_logging
    
    # Setup logging for a component
    logger = setup_logging("my_component")
    logger.info("Component initialized")
    ```

Author: MIRA Memory System
"""

import logging

def setup_logging(name: str = "MIRA", level: int = logging.INFO) -> logging.Logger:
    """Setup logging for MIRA components."""
    logger = logging.getLogger(name)
    
    if not logger.handlers:
        handler = logging.StreamHandler()
        formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
        handler.setFormatter(formatter)
        logger.addHandler(handler)
        logger.setLevel(level)
    
    return logger