Files
ObsiGate/backend/tools/api.py
T
bruno 6a58a59a11
CI / lint (push) Successful in 1m37s
CI / security (push) Successful in 1m1s
CI / test (push) Successful in 3m26s
CI / build (push) Successful in 1m44s
CI / e2e (push) Successful in 11m1s
feat(ai): ecosysteme d'outils phase 2 - recherche a cle, cache/retry, Playwright, crawl, Gitea/GitHub, documents (#92)
2026-09-17 11:52:03 -04:00

74 lines
2.0 KiB
Python

"""Public facade for the AI tool layer.
Importing this module registers all built-in tools (via
``backend.tools.service``) and re-exports the public API. Consumers (agent
loop, MCP server, tests) should import from here rather than from individual
submodules.
Note: ObsiGate uses implicit namespace packages (no tracked ``__init__.py``,
which ``.gitignore`` excludes via ``_*.py``), hence this explicit facade.
"""
from backend.tools import connected as _connected # noqa: F401 (registers connected-source tools)
from backend.tools import crawler as _crawler # noqa: F401 (registers the site crawler)
from backend.tools import documents as _documents # noqa: F401 (registers document tools)
from backend.tools import service as _service # noqa: F401 (registers tools)
from backend.tools import web as _web # noqa: F401 (registers web tools)
from backend.tools.context import (
ToolConfirmationRequired,
ToolContext,
ToolError,
ToolMode,
ToolNotFoundError,
ToolPermissionError,
ToolRateLimitError,
ToolRisk,
ToolScope,
ToolValidationError,
resolve_safe_path,
)
from backend.tools.ratelimit import (
check_and_record as check_tool_rate_limit,
)
from backend.tools.ratelimit import (
get_status as get_tool_rate_limit_status,
)
from backend.tools.ratelimit import (
reset as reset_tool_rate_limit,
)
from backend.tools.redaction import redact_payload
from backend.tools.registry import (
ToolSpec,
call_tool,
get_tool,
get_tool_schemas,
list_tools,
tool,
)
from backend.tools.schemas import ToolResult
__all__ = [
"ToolConfirmationRequired",
"ToolContext",
"ToolError",
"ToolMode",
"ToolNotFoundError",
"ToolPermissionError",
"ToolRateLimitError",
"ToolResult",
"ToolRisk",
"ToolScope",
"ToolSpec",
"ToolValidationError",
"call_tool",
"check_tool_rate_limit",
"get_tool",
"get_tool_rate_limit_status",
"get_tool_schemas",
"list_tools",
"redact_payload",
"reset_tool_rate_limit",
"resolve_safe_path",
"tool",
]