"""
Sequential execution trigger system with optimistic concurrency control.

All operations (websocket, cron, data events) flow through a priority queue,
execute in parallel, but commit in strict sequential order with conflict detection.
"""

from .context import ExecutionContext, get_execution_context
from .types import Priority, PriorityTuple, Trigger, CommitIntent, ExecutionState
from .store import VersionedStore, StoreBackend, PydanticStoreBackend
from .coordinator import CommitCoordinator
from .queue import TriggerQueue
from .handlers import AgentTriggerHandler, LambdaHandler

__all__ = [
    # Context
    "ExecutionContext",
    "get_execution_context",
    # Types
    "Priority",
    "PriorityTuple",
    "Trigger",
    "CommitIntent",
    "ExecutionState",
    # Store
    "VersionedStore",
    "StoreBackend",
    "PydanticStoreBackend",
    # Coordination
    "CommitCoordinator",
    "TriggerQueue",
    # Handlers
    "AgentTriggerHandler",
    "LambdaHandler",
]
