# Public schema surface: enums, errors, and models.
from anima.core.contracts.specs import CapabilityToken, JobSpec, Meta
from .enums import (
    AgentState,
    CompletionPolicy,
    ContextMode,
    LifecycleType,
    SideEffectPolicy,
    ToolPosture,
)
from .errors import (
    ERROR_CODES,
    AgentAlreadyExistsError,
    AgentNotFoundError,
    AgentNotInteractiveError,
    AgentNotTerminalError,
    AgentTerminatedError,
    AnimaError,
    AnimaTimeoutError,
    ApprovalRequiredError,
    BudgetExhaustedError,
    InternalError,
    InvalidInputError,
    MCPConnectionError,
    MCPConnectionRefusedError,
    MCPSocketNotFoundError,
    MaxDepthExceededError,
    MaxTurnsReachedError,
    NotFoundError,
    ToolBlockedError,
    UnsupportedModelError,
    build_error_envelope,
    numeric_code_to_string,
)
from .models import (
    AgentResult,
    AgentStateData,
    AnimaGlobalConfig,
    CanSpawn,
    CompactionConfig,
    ContextBundle,
    GlobalDefaultsConfig,
    PersonaSpec,
    RawTailEntry,
    SummaryRef,
    LogEntry,
    TokenUsage,
    ToolCallCount,
    ToolOutputGovernanceConfig,
    ToolOutputModelProfile,
    ToolOutputProviderProfile,
    ToolOutputToolDefault,
    ToolPresetConfig,
    _validate_can_spawn,
)

__all__ = [
    "AgentState",
    "CompletionPolicy",
    "ContextMode",
    "LifecycleType",
    "SideEffectPolicy",
    "ToolPosture",
    "ERROR_CODES",
    "AgentAlreadyExistsError",
    "AgentNotFoundError",
    "AgentNotInteractiveError",
    "AgentNotTerminalError",
    "AgentTerminatedError",
    "AnimaError",
    "AnimaTimeoutError",
    "ApprovalRequiredError",
    "BudgetExhaustedError",
    "InternalError",
    "InvalidInputError",
    "MCPConnectionError",
    "MCPConnectionRefusedError",
    "MCPSocketNotFoundError",
    "MaxDepthExceededError",
    "MaxTurnsReachedError",
    "NotFoundError",
    "ToolBlockedError",
    "UnsupportedModelError",
    "build_error_envelope",
    "numeric_code_to_string",
    "AnimaGlobalConfig",
    "AgentResult",
    "AgentStateData",
    "CanSpawn",
    "CapabilityToken",
    "CompactionConfig",
    "ContextBundle",
    "GlobalDefaultsConfig",
    "JobSpec",
    "LogEntry",
    "Meta",
    "PersonaSpec",
    "RawTailEntry",
    "SummaryRef",
    "TokenUsage",
    "ToolCallCount",
    "ToolOutputGovernanceConfig",
    "ToolOutputModelProfile",
    "ToolOutputProviderProfile",
    "ToolOutputToolDefault",
    "ToolPresetConfig",
    "_validate_can_spawn",
]
