From e9b1ba37ca372aaf57e7076d7cafdbebe2c0e0ef Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 5 Sep 2026 15:08:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(isolation):=20load=5Fagent=5Fconfig=20gener?= =?UTF-8?q?ic=20=E6=97=B6=E5=89=94=E9=99=A4=20category=3Dproject=20?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E2=80=94=E2=80=94=E9=80=9A=E7=94=A8=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=E4=B8=8D=E5=BA=94=E7=9C=8B=E8=A7=81/=E6=93=8D?= =?UTF-8?q?=E4=BD=9C=E4=BB=BB=E4=BD=95=E4=BA=A7=E7=BA=BF=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 配套 pipeline-service 产线隔离修复(2026-09-05)。执行层兜底在 agent_loop_v2._dispatch_sdlc_tool(别名归一后拦截)。 --- pipeline_core/agent_config.py | 6 ++++++ 1 file changed, 6 insertions(+) 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)