"""
Trader API — unified facade for the GUI backend to interact with the trading engine.

Re-exports core functions from gold_trader.py and provides safe no-op stubs
for features not yet implemented, so the GUI never crashes on import.
"""

from __future__ import annotations

import pathlib
from typing import Any, Optional, Tuple, Dict, List

# ── Core runtime exports (delegated to gold_trader) ──────────────────

from bridge.gold_trader import (
    DAEMON_LOG,
    get_price,
    load_state,
    get_agent_direction,
    get_technical_trend_bias,
    is_mt5_running,
    restart_mt5,
    trigger_panic_close_and_block,
    set_strategy_override,
    reset_signal_generator,
    get_signal_generator_status,
)

# ── Stubs for not-yet-implemented features ──────────────────────────


def preload_runtime_bindings() -> None:
    """Preload signal generators into memory cache (optional, best-effort)."""


def set_auto_select_enabled(enabled: bool) -> None:
    """Enable/disable automatic signal generator selection."""


def clear_strategy_cache() -> None:
    """Clear the in-memory signal generator cache."""


def warm_signal_generator(strategy_type: str = "") -> None:
    """Pre-warm a signal generator so the first tick is fast."""
