diff --git a/pipeline_core/agent_config.py b/pipeline_core/agent_config.py index 6fe376d..66151cf 100644 --- a/pipeline_core/agent_config.py +++ b/pipeline_core/agent_config.py @@ -385,6 +385,12 @@ async def load_agent_config(pipeline_id: str = None, project_id: str = None, gen else: ability = get_ability(pipeline_id) if pipeline_id else get_ability(DEFAULT_ABILITY_ID) tools = list(GENERAL_TOOLS) + # 产线隔离(2026-09-05):纯通用会话剔除全部项目管理工具——否则通用助手 + # 的 schema 里会出现 switch_project/project_info/list_my_projects 等, + # LLM 看到就能查看/切换/操作任何产线的项目(含他人产线的)。 + # 执行层在 agent_loop_v2._dispatch_sdlc_tool 还有一道拦截兜底。 + if generic: + tools = [t for t in tools if t.category != "project"] prompt = base.system_prompt if ability: tools = _merge_tools(ability.tools, tools)