"""Formula engine for the bitable subsystem.

Self-contained Python formula engine (KTD3) — no external dependencies.

Submodules:
- :mod:`agentkit.bitable.formula.parser` — parse formula strings to AST
- :mod:`agentkit.bitable.formula.engine` — DAG, topological sort, evaluation
- :mod:`agentkit.bitable.formula.functions` — built-in function registry
"""

from __future__ import annotations

from agentkit.bitable.formula.engine import (
    CircularReferenceError,
    FormulaEngine,
)
from agentkit.bitable.formula.functions import FUNCTION_REGISTRY
from agentkit.bitable.formula.parser import (
    FormulaParseError,
    FormulaSecurityError,
    UnknownFunctionError,
    parse_formula,
)

__all__ = [
    "CircularReferenceError",
    "FormulaEngine",
    "FormulaParseError",
    "FormulaSecurityError",
    "FUNCTION_REGISTRY",
    "UnknownFunctionError",
    "parse_formula",
]
