"""Sandbox infrastructure for CleverAgents.

Provides resource isolation during plan execution through the Sandbox protocol
and multiple strategy implementations (git worktree, filesystem copy, no-op).

Stage B3 of the implementation plan.  Updated in TASK-006 (B4 rework).
Updated in M4 to add checkpoint/rollback hooks.
Updated in M6 to add sandbox boundary algebra (#548).
Updated in M6+ to add custom sandbox strategy registration (#586).
"""

from cleveragents.infrastructure.sandbox.boundary import (
    BoundaryCache,
    NoSandboxBoundaryError,
    SandboxBoundaryError,
    compute_sandbox_domains,
    is_sandbox_boundary,
    sandbox_boundary,
)
from cleveragents.infrastructure.sandbox.checkpoint import (
    Checkpointable,
    CheckpointManager,
    SandboxCheckpoint,
)
from cleveragents.infrastructure.sandbox.copy_on_write import CopyOnWriteSandbox
from cleveragents.infrastructure.sandbox.factory import SandboxFactory
from cleveragents.infrastructure.sandbox.git_worktree import GitWorktreeSandbox
from cleveragents.infrastructure.sandbox.manager import SandboxManager
from cleveragents.infrastructure.sandbox.merge import (
    GitMergeStrategy,
    JsonMergeStrategy,
    MergeResult,
    MergeStrategy,
    SequentialMergeStrategy,
)
from cleveragents.infrastructure.sandbox.no_sandbox import NoSandbox
from cleveragents.infrastructure.sandbox.overlay import OverlaySandbox
from cleveragents.infrastructure.sandbox.protocol import (
    AtomicCommitError,
    CommitResult,
    Sandbox,
    SandboxContext,
    SandboxError,
    SandboxStatus,
)
from cleveragents.infrastructure.sandbox.strategy_adapter import (
    BuiltInSandboxStrategyAdapter,
)
from cleveragents.infrastructure.sandbox.strategy_registry import (
    CustomStrategyConfig,
    SandboxStrategyRegistry,
)
from cleveragents.infrastructure.sandbox.transaction_sandbox import TransactionSandbox

__all__ = [
    "AtomicCommitError",
    "BoundaryCache",
    "BuiltInSandboxStrategyAdapter",
    "CheckpointManager",
    "Checkpointable",
    "CommitResult",
    "CopyOnWriteSandbox",
    "CustomStrategyConfig",
    "GitMergeStrategy",
    "GitWorktreeSandbox",
    "JsonMergeStrategy",
    "MergeResult",
    "MergeStrategy",
    "NoSandbox",
    "NoSandboxBoundaryError",
    "OverlaySandbox",
    "Sandbox",
    "SandboxBoundaryError",
    "SandboxCheckpoint",
    "SandboxContext",
    "SandboxError",
    "SandboxFactory",
    "SandboxManager",
    "SandboxStatus",
    "SandboxStrategyRegistry",
    "SequentialMergeStrategy",
    "TransactionSandbox",
    "compute_sandbox_domains",
    "is_sandbox_boundary",
    "sandbox_boundary",
]
