docs: README 补通用会话产线隔离 7 层纵深防御说明
This commit is contained in:
parent
874a14b6bb
commit
83c6d7aa5d
22
README.md
22
README.md
@ -39,3 +39,25 @@ cd pkgs/pipeline-service && pip install .
|
||||
| `intent_classifier.py` | 意图识别 |
|
||||
| `state.py` | 状态机 |
|
||||
| `step_registry.py` | 步骤类型注册表 |
|
||||
| `agent_loop_v2.py` | Agent Executor v2(会话 agent 执行引擎) |
|
||||
| `workspace.py` | 项目/通用会话工作空间目录管理 |
|
||||
| `sdlc_ability.py` | SDLC 产线能力包(工具定义 + handler) |
|
||||
|
||||
## 通用会话产线隔离(2026-09-05,7 层纵深防御)
|
||||
|
||||
规范:通用会话(generic=True,agent_chat_generic.dspy)= 纯通用 agent,
|
||||
不挂任何产线工具/技能/角色/记忆,不得看到或操作任何产线的项目。
|
||||
|
||||
隔离层(缺一层即泄漏,详见技能 cockpit-agent-patterns):
|
||||
|
||||
1. **工具注册表**:ToolRegistry 每 executor 独立实例(禁全局单例,防跨会话残留)
|
||||
2. **默认产线回退**:generic 会话 pipeline_id 空不回退 DEFAULT_ABILITY_ID
|
||||
3. **产线能力包**:_execute_ability_tool 对 generic 直接拒绝
|
||||
4. **工具 schema**:load_agent_config(pipeline-core)generic 时剔除 project/shell 类工具
|
||||
5. **执行层兜底**:_dispatch_sdlc_tool 对 generic 拒绝项目管理工具(别名归一后拦截)
|
||||
6. **工作空间**:generic 会话文件根 = `_general/{user_id}` 专属目录(generic_workspace_dir),
|
||||
_resolve_ws_path 越界保护圈死;run_command 剔除(shell 无法圈禁);
|
||||
resolve_upload_dir(pipeline-core)generic=True 上传落同一专属目录
|
||||
7. **历史回放**:_load_history / _t_session_search 对 generic 只读写
|
||||
`pipeline_id='' OR IS NULL` 的自身历史(与存库端 store_pl='' 对称),
|
||||
禁止按 created_by 全量回放(会带出用户各产线对话中的项目信息)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user