"""
Helix Substrate Module

The physics layer of the semantic substrate:
- FibPi: Mathematical foundation
- Core: CDR operators, Seed, Substrate, step_glyph
- Executor: ExecutionOrchestrator for SubstratePlan execution
- Receipt: ExecutionReceipt for tamper-evident proofs
"""

# FibPi math
from .fibpi import (
    GOLDEN,
    PI_LIKE,
    PHI,
    fibpi_mix_u64,
    fibpi_regen_schedule,
    fibpi_vault_coords,
    fibpi_metric,
    fibpi_distance,
    fibpi_metric_for_manifest,
    fibpi_opt_position,
    fibpi_energy,
    fibpi_score,
    substrate_fingerprint
)

# CDR Core
from .core import (
    Seed,
    Substrate,
    GlyphState,
    load_vault,
    step_glyph,
    distance,
    gradient_toward,
    merge,
    split,
    interpolate,
)

# Execution Orchestration
from .execution_receipt import (
    OperationResult,
    ExecutionReceipt,
    validate_execution_receipt,
    save_execution_receipt,
    load_execution_receipt,
)

from .executor import (
    ExecutionContext,
    SubstrateOps,
    ExecutionOrchestrator,
    execute_plan_cli,
)

__all__ = [
    # FibPi
    'GOLDEN',
    'PI_LIKE',
    'PHI',
    'fibpi_mix_u64',
    'fibpi_regen_schedule',
    'fibpi_vault_coords',
    'fibpi_metric',
    'fibpi_distance',
    'fibpi_metric_for_manifest',
    'fibpi_opt_position',
    'fibpi_energy',
    'fibpi_score',
    'substrate_fingerprint',
    # CDR Core
    'Seed',
    'Substrate',
    'GlyphState',
    'load_vault',
    'step_glyph',
    'distance',
    'gradient_toward',
    'merge',
    'split',
    'interpolate',
    # Execution Orchestration
    'OperationResult',
    'ExecutionReceipt',
    'validate_execution_receipt',
    'save_execution_receipt',
    'load_execution_receipt',
    'ExecutionContext',
    'SubstrateOps',
    'ExecutionOrchestrator',
    'execute_plan_cli',
]
