feat: 岗位职责迁至业务链席位,并支持 WeKnora 嵌入页知识库切换

将岗位职责从智能体配置迁移到业务链席位 JSON,会商面板只读展示;WeKnora 嵌入 iframe 支持在授权可见范围内切换知识库并重新签发会话。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
董宏凯andCursor committed 2026-08-19 22:26:40 +08:00
1 parent e860357563
commit e881c242fe
16 files changed
+434 -257

No files matched your search

@@ -412,7 +412,6 @@ def test_load_config_extras_returns_values_written_to_yaml(isolated_paths) -> No
"common_questions": None,
"template_name": None,
"seat_skill_directive": None,
"job_responsibilities": None,
"llmwiki_knowledge_base_ids": None,
}
@@ -426,7 +425,6 @@ def test_load_config_extras_missing_directory_returns_none_triple(isolated_paths
"common_questions": None,
"template_name": None,
"seat_skill_directive": None,
"job_responsibilities": None,
"llmwiki_knowledge_base_ids": None,
}
@@ -499,31 +497,6 @@ def test_write_agent_config_omits_skills_when_none(isolated_paths) -> None:
assert "tool_groups" not in raw
def test_write_agent_config_persists_job_responsibilities(isolated_paths) -> None:
agent_id = "agent-job-1"
_write_agent_config(
agent_id,
name="助手",
description="",
job_responsibilities=" 负责意图识别与业务链确认 ",
)
config_file = paths_module.get_paths().agent_dir(agent_id) / "config.yaml"
raw = yaml.safe_load(config_file.read_text(encoding="utf-8"))
assert raw["job_responsibilities"] == "负责意图识别与业务链确认"
assert _load_config_extras(agent_id)["job_responsibilities"] == "负责意图识别与业务链确认"
def test_write_agent_config_omits_blank_job_responsibilities(isolated_paths) -> None:
agent_id = "agent-job-2"
_write_agent_config(agent_id, name="助手", description="", job_responsibilities=" ")
config_file = paths_module.get_paths().agent_dir(agent_id) / "config.yaml"
raw = yaml.safe_load(config_file.read_text(encoding="utf-8"))
assert "job_responsibilities" not in raw
assert _load_config_extras(agent_id)["job_responsibilities"] is None
@pytest.mark.asyncio
async def test_backfill_listing_cache_mirrors_config_values() -> None:
store = MemoryAgentStore()