pipeline_core/README.md

62 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# pipeline_core
产线核心模块 —— 管理产线定义、步骤编排、版本控制、发布流程。
## 功能
- **产线管理**:产线 CRUD定义产线名称与描述
- **步骤编排**产线步骤的增删改查支持依赖关系DAG
- **版本控制**:产线版本发布与回滚
- **编辑器**:可视化产线步骤编排界面
## 数据表
| 表 | 说明 |
|---|------|
| pipelines | 产线定义 |
| pipeline_steps | 产线步骤(含 deps 依赖) |
| pipeline_versions | 产线版本快照 |
| llm | 大模型配置 |
| sd_projects | 软件项目定义2026-09-10 自 pipeline-sdlc 迁入,跨产线共享) |
| sd_project_role_models | 项目角色模型配置(同上迁入;下拉 codes 指 sd_role 字典 + llm_model(status=active) |
| pipeline_deliverables | 产线交付物(同上迁入;主要写入方 pipeline-bidding |
## 跨产线共享资源wwwroot/api/
三张迁入表配套 15 个 api dspy 与手写角色模型页(`wwwroot/sd_project_role_models/`
git 跟踪、勿被 xls2ui 覆盖。sdlc 侧页面消费 `get_project_options.dspy` 用绝对路径
`/pipeline_core/api/**` 引用;反向本模块页面消费 sdlc 子表也用绝对路径。
### 已知表治理清单2026-09-10 审计)
- `pipeline_conversations`孤儿表——有真实读写pipeline-service agent_loop_v2 的 sor.C
落盘、驾驶舱 v2 历史加载),但**全平台无 models JSON 定义**,建表靠历史残留,
新库部署会缺表。待补 models 定义(归属 pipeline-service 或 core 待定)。
- `sd_conversations`死表——pipeline-sdlc 有 models 定义,但 2026-08-01 后全平台零写,
仅存 SELECT/DELETE/孤儿巡检引用。驾驶舱 v2 已改用 pipeline_conversations。待删除决议。
## 安装
```bash
cd pkgs/pipeline_core && pip install .
```
## 集成
伞仓 (pipeline-app) 通过 wwwroot symlink 加载本模块:
```
wwwroot/pipeline_core -> ../pkgs/pipeline_core/wwwroot
```
## 通用会话产线隔离2026-09-05
配合 pipeline-service 的 7 层隔离(详见其 README本模块承担
- `agent_config.load_agent_config(generic=True)`:不挂产线能力包,
并剔除 GENERAL_TOOLS 中 category=project/shell 的工具schema 层防线,
LLM 根本看不见项目管理/命令执行工具)
- `upload_tools.resolve_upload_dir(generic=True)`:通用会话上传文件落
`_general/{uid}` 专属目录,与 AgentExecutor 的文件根一致
_resolve_ws_path 越界保护只认该目录)
- `wwwroot/api/agent_chat_generic.dspy`纯通用会话入口generic=True