"""
Events Domain Module

领域事件总线的 Domain 层。

此模块提供事件驱动架构的基础设施，支持 Beta Gate、Alpha Trigger 和 Decision Rhythm 模块之间的解耦通信。
"""

from .entities import (
    # 核心实体
    DomainEvent,
    EventBusConfig,
    # 类型别名
    EventCallback,
    EventFilter,
    EventHandler,
    EventMetrics,
    EventSnapshot,
    EventSubscription,
    # 事件类型
    EventType,
    SubscriptionFilter,
    # 便捷工厂函数
    create_event,
    create_subscription,
)
from .rules import (
    EventAgeRule,
    EventDeduplicationRule,
    EventFilterRule,
    EventRuleEngine,
    EventThrottleRule,
    EventValidationRule,
    create_default_rule_engine,
    create_strict_rule_engine,
)
from .services import (
    # 事件总线
    EventBus,
    InMemoryEventBus,
    # 装饰器
    event_handler,
    # 全局实例
    get_event_bus,
    reset_event_bus,
)

__all__ = [
    # 事件类型
    "EventType",
    # 核心实体
    "DomainEvent",
    "EventHandler",
    "EventSubscription",
    "EventFilter",
    "EventBusConfig",
    "EventMetrics",
    "EventSnapshot",
    # 便捷工厂函数
    "create_event",
    "create_subscription",
    # 类型别名
    "EventCallback",
    "SubscriptionFilter",
    # 事件总线
    "EventBus",
    "InMemoryEventBus",
    # 全局实例
    "get_event_bus",
    "reset_event_bus",
    # 装饰器
    "event_handler",
    # 规则
    "EventRuleEngine",
    "EventFilterRule",
    "EventDeduplicationRule",
    "EventThrottleRule",
    "EventAgeRule",
    "EventValidationRule",
    "create_default_rule_engine",
    "create_strict_rule_engine",
]
