"""
Exchange Kernel API

The exchange kernel provides a Kubernetes-style declarative API for managing orders
across different exchanges. It maintains both desired state (intent) and actual state
(current orders on exchange) and reconciles them continuously.

Key concepts:
- OrderIntent: What the strategy kernel wants
- OrderState: What actually exists on the exchange
- Reconciliation: Bringing actual state into alignment with desired state
"""

from .base import ExchangeKernel
from .events import (
    OrderEvent,
    OrderSubmitted,
    OrderAccepted,
    OrderRejected,
    OrderPartiallyFilled,
    OrderFilled,
    OrderCanceled,
    OrderModified,
    OrderExpired,
    PositionEvent,
    PositionOpened,
    PositionModified,
    PositionClosed,
    AccountEvent,
    AccountBalanceUpdated,
    MarginCallWarning,
)
from .models import (
    OrderIntent,
    OrderState,
    Position,
    Asset,
    AssetMetadata,
    AccountState,
    Balance,
)
from .state import IntentStateStore, ActualStateStore

__all__ = [
    # Core interface
    "ExchangeKernel",
    # Events
    "OrderEvent",
    "OrderSubmitted",
    "OrderAccepted",
    "OrderRejected",
    "OrderPartiallyFilled",
    "OrderFilled",
    "OrderCanceled",
    "OrderModified",
    "OrderExpired",
    "PositionEvent",
    "PositionOpened",
    "PositionModified",
    "PositionClosed",
    "AccountEvent",
    "AccountBalanceUpdated",
    "MarginCallWarning",
    # Models
    "OrderIntent",
    "OrderState",
    "Position",
    "Asset",
    "AssetMetadata",
    "AccountState",
    "Balance",
    # State management
    "IntentStateStore",
    "ActualStateStore",
]
