oclaw/tests/test_specialists_registry.py
oliver 454c841af7 Converge manager out of product roles and drop dead inherit prefs.
Specialists-only binding/prewarm/MCP allowlists fold legacy manager aliases into generalist; stop persisting confirm/plan prefs and strip inherit from prompt signatures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 03:07:38 +08:00

21 lines
901 B
Python

from __future__ import annotations
from runtime.agents import specialists as specialists_mod
def test_unknown_dynamic_specialist_defaults_to_minimum_expert_permissions(monkeypatch) -> None:
monkeypatch.setattr(specialists_mod, "discover_specialist_ids", lambda: ("generalist", "qa"))
assert specialists_mod.expert_name_for_specialist("qa") == "generalist"
def test_agent_role_ids_uses_runtime_discovery(monkeypatch) -> None:
monkeypatch.setattr(specialists_mod, "discover_specialist_ids", lambda: ("generalist", "ops", "qa"))
got = specialists_mod.agent_role_ids()
assert got[0] == "generalist"
assert "manager" not in set(got)
assert "qa" in set(got)
def test_builtin_specialists_include_memory_tools() -> None:
assert "memory" in specialists_mod.expert_name_for_specialist("generalist")
assert "memory" in specialists_mod.expert_name_for_specialist("ops")