"""
mizan-fastapi — FastAPI backend adapter for the Mizan protocol.

HTTP RPC dispatch and context bundling on top of mizan-core's function
registry. Channels, Forms, Shapes, SSR are out of scope — FastAPI
projects use native equivalents (WebSocket, Pydantic, ORM-of-choice,
SSR frameworks).

Usage:
    from fastapi import FastAPI
    from mizan_fastapi import router, mizan_exception_handler, MizanError

    app = FastAPI()
    app.include_router(router, prefix="/api/mizan")
    app.add_exception_handler(MizanError, mizan_exception_handler)

    # Register your @client-decorated functions
    from mizan_core.client.function import client
    from mizan_core.registry import register
    from .my_functions import echo
    register(echo, "echo")
"""

from .executor import (
    ErrorCode,
    MizanError,
    NotFound,
    BadRequest,
    ValidationFailed,
    Unauthorized,
    Forbidden,
    NotImplementedYet,
    InternalError,
    compute_invalidation,
    execute_function,
)
from .router import router, mizan_exception_handler, mizan_validation_handler
from .schema import build_schema

__all__ = [
    "router",
    "mizan_exception_handler",
    "mizan_validation_handler",
    "execute_function",
    "compute_invalidation",
    "build_schema",
    "ErrorCode",
    "MizanError",
    "NotFound",
    "BadRequest",
    "ValidationFailed",
    "Unauthorized",
    "Forbidden",
    "NotImplementedYet",
    "InternalError",
]
