# SPDX-License-Identifier: MIT
# Copyright © 2025 Bijan Mousavi

"""Domain-owned effect interfaces (end-of-Bijux RAG).

The architecture treats these effect descriptions as part of the domain layer:
- `IOPlan`: deferred, composable IO as pure data
- IOPlan-specific wrappers: retry (idempotent only) and transaction bracketing
 - `AsyncPlan`/`AsyncGen`: deferred async effects and lazy async streams as pure descriptions
"""

from .async_ import (
    AsyncAction,
    AsyncGen,
    AsyncPlan,
    BackpressurePolicy,
    ChunkPolicy,
    Clock,
    FairnessPolicy,
    FakeClock,
    FakeSleeper,
    FakeTimeout,
    RateLimitPolicy,
    RealSleeper,
    ResilienceEnv,
    Sleep,
    Sleeper,
    SystemClock,
    TimeoutCtx,
    TimeoutPolicy,
    async_bind,
    async_from_result,
    async_gather,
    async_gen_and_then,
    async_gen_bounded_map,
    async_gen_chunk,
    async_gen_fair_merge,
    async_gen_flat_map,
    async_gen_from_list,
    async_gen_gather,
    async_gen_map,
    async_gen_map_action,
    async_gen_rate_limited,
    async_gen_return,
    async_gen_using,
    async_lift,
    async_map,
    async_pure,
    async_with_resilience,
    lift_async_item,
    lift_sync,
    lift_sync_gen_with_executor,
    lift_sync_with_executor,
    make_fake_timeout_ctx,
    make_test_resilience_env,
    resilient_mapper,
)
from .async_ import (
    RetryPolicy as AsyncRetryPolicy,
)
from .io_plan import IOPlan, io_bind, io_delay, io_map, io_pure, perform
from .io_retry import RetryPolicy, is_transient, retry_idempotent
from .tx import Session, Tx, TxProtocol, session_with, with_tx

__all__ = [
    "IOPlan",
    "io_pure",
    "io_delay",
    "io_bind",
    "io_map",
    "perform",
    "RetryPolicy",
    "is_transient",
    "retry_idempotent",
    "Session",
    "session_with",
    "TxProtocol",
    "Tx",
    "with_tx",
    "AsyncPlan",
    "AsyncAction",
    "async_pure",
    "async_from_result",
    "async_bind",
    "async_map",
    "async_lift",
    "async_gather",
    "AsyncGen",
    "async_gen_return",
    "async_gen_from_list",
    "async_gen_map",
    "async_gen_map_action",
    "async_gen_and_then",
    "async_gen_flat_map",
    "async_gen_gather",
    "lift_async_item",
    "async_gen_using",
    "BackpressurePolicy",
    "async_gen_bounded_map",
    "TimeoutCtx",
    "Clock",
    "SystemClock",
    "FakeClock",
    "FakeTimeout",
    "make_fake_timeout_ctx",
    "Sleep",
    "ResilienceEnv",
    "make_test_resilience_env",
    "AsyncRetryPolicy",
    "TimeoutPolicy",
    "async_with_resilience",
    "resilient_mapper",
    "RateLimitPolicy",
    "FairnessPolicy",
    "async_gen_rate_limited",
    "async_gen_fair_merge",
    "Sleeper",
    "RealSleeper",
    "FakeSleeper",
    "ChunkPolicy",
    "async_gen_chunk",
    "lift_sync",
    "lift_sync_with_executor",
    "lift_sync_gen_with_executor",
]
