From c6a1da198025b45d82998eb0314b73f1d7f86fa8 Mon Sep 17 00:00:00 2001 From: oliver Date: Wed, 29 Apr 2026 01:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=85=A8=E4=B8=93=E5=AE=B6=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E5=BC=80=E6=94=BE=20memory=20wiki=20=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=83=BD=E5=8A=9B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 generalist/ops/image 的 expert 组合加入 memory,使主控调度下的各专家都可调用 memory_wiki_search/apply/lint,并补充注册策略测试防止回归。 Made-with: Cursor --- runtime/agents/specialists.py | 6 +++--- tests/test_specialists_registry.py | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/runtime/agents/specialists.py b/runtime/agents/specialists.py index 344853f2..75fd6088 100644 --- a/runtime/agents/specialists.py +++ b/runtime/agents/specialists.py @@ -24,19 +24,19 @@ class SpecialistConfig: SPECIALISTS: dict[SpecialistId, SpecialistConfig] = { "ops": SpecialistConfig( specialist_id="ops", - expert_name="network_ops", + expert_name="network_ops+memory", default_tool_tags=None, ), "generalist": SpecialistConfig( specialist_id="generalist", - expert_name="generalist+workspace+productivity", + expert_name="generalist+workspace+productivity+memory", default_tool_tags=None, ), "image": SpecialistConfig( specialist_id="image", # image specialist currently reuses generalist expert tool registry, # including image_edit tool. - expert_name="generalist", + expert_name="generalist+memory", default_tool_tags=None, ), "memory": SpecialistConfig( diff --git a/tests/test_specialists_registry.py b/tests/test_specialists_registry.py index 6993790f..4ddf665b 100644 --- a/tests/test_specialists_registry.py +++ b/tests/test_specialists_registry.py @@ -13,3 +13,9 @@ def test_agent_role_ids_uses_runtime_discovery(monkeypatch) -> None: 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") + assert "memory" in specialists_mod.expert_name_for_specialist("image")