mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-09 01:50:44 +08:00
- Rename platform/ to svc/ to avoid shadowing stdlib platform. - Replace from oclaw.* with from svc/runtime/interfaces; update -m CLI paths. - tests/conftest: prepend repo root to sys.path (no parent-folder package name). - CI: paths and offline_eval script under repo root. - Ops scripts: PYTHONPATH must be repo root for python -m runtime.* (fixes gateway/WhatsApp sidecar startup). - Fix default oclaw.json path in tabular/file attachment limits; stabilize attachment test config. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
884 B
Python
20 lines
884 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] == specialists_mod.MANAGER_AGENT_ID
|
|
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")
|