"""Baponi: sandboxed code execution for AI agents.

Quick start::

    from baponi import Baponi

    client = Baponi()  # reads BAPONI_API_KEY from env
    result = client.execute("print('Hello!')")
    print(result.stdout)  # Hello!
"""

from baponi._async_client import AsyncBaponi
from baponi._client import Baponi
from baponi._constants import VERSION
from baponi._events import (
    ExecutionEvent,
    KeepaliveEvent,
    OutputEvent,
    ResultEvent,
    StatusEvent,
)
from baponi._streaming import AsyncExecutionStream, ExecutionStream
from baponi._webhook import AsyncExecutionHandle, ExecutionHandle
from baponi.exceptions import (
    APITimeoutError,
    APIValidationError,
    AuthenticationError,
    BaponiError,
    ForbiddenError,
    RateLimitError,
    ServerError,
    ThreadBusyError,
)
from baponi.types import (
    CancelResponse,
    ExecutionStatus,
    FileEntry,
    SandboxResult,
    SignedUrl,
    WebhookAccepted,
)

__version__ = VERSION

__all__ = [
    "APITimeoutError",
    "APIValidationError",
    "AsyncBaponi",
    "AsyncExecutionHandle",
    "AsyncExecutionStream",
    "AuthenticationError",
    "Baponi",
    "BaponiError",
    "CancelResponse",
    "ExecutionEvent",
    "ExecutionHandle",
    "ExecutionStatus",
    "ExecutionStream",
    "FileEntry",
    "ForbiddenError",
    "KeepaliveEvent",
    "OutputEvent",
    "RateLimitError",
    "ResultEvent",
    "SandboxResult",
    "ServerError",
    "SignedUrl",
    "StatusEvent",
    "ThreadBusyError",
    "WebhookAccepted",
]
