"""The warden — the per-project resident broker that is the sole test executor.

Single-flight is enforced *by construction*: the warden is one process, so the
acquire decision (free -> grant / same-test+config -> coalesce / else -> queue) is
an in-process critical section with no file-lock TOCTOU. A Unix-domain socket makes
that one process the executor for every origin (CLI / web / agent / CI); the client
fails closed if it's down. Leases carry a heartbeat + TTL for warden-crash recovery
(audited reclaim, never a silent steal).
"""

from __future__ import annotations

from .broker import AcquireOutcome, CancelOutcome, Warden
from .client import WardenClient, WardenUnreachable
from .daemon import WardenDaemon, is_live
from .leases import Lease, LeaseRegistry, RunRequest

__all__ = [
    "AcquireOutcome",
    "CancelOutcome",
    "Lease",
    "LeaseRegistry",
    "RunRequest",
    "Warden",
    "WardenClient",
    "WardenDaemon",
    "WardenUnreachable",
    "is_live",
]
