oclaw/tests/test_netx_expert_registry.py
oliver efa72df362 Remove plan mode, skill toolcall path, and inline netx tools.
Wave C subtraction: keep skills as prompt-only, route netx via MCP with a shared netx_http client for xlsx/context inject, and delete plan_agent_v2 from the gateway.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 01:17:39 +08:00

25 lines
816 B
Python

"""Expert registry: inline netx_* tools removed; MCP only."""
from __future__ import annotations
import pytest
from runtime.tools import expert_registry
@pytest.fixture(autouse=True)
def _clear_expert_cache():
expert_registry._CACHED_FACTORIES_BY_EXPERT = None
expert_registry._CACHED_SPECS_BY_EXPERT = None
yield
expert_registry._CACHED_FACTORIES_BY_EXPERT = None
expert_registry._CACHED_SPECS_BY_EXPERT = None
def test_netx_inline_tools_never_registered(monkeypatch):
monkeypatch.setenv("OCLAW_NETX_BUILTIN_TOOLS", "1")
factories = expert_registry.discover_expert_tool_factories()
network_ops = factories.get("network_ops") or []
names = {f().name for f in network_ops}
assert not any(n.startswith("netx_") for n in names)
assert "ume_alarm_xlsx_report" in names