背景:用户明确迭代状态机语义——当前迭代唯一(状态 in_progress)、按序号 1,2,3 推进、 需用户指令启动下一迭代、启动下一迭代时若当前未结束则强制完成。 1. iteration_capability.py: - create_iteration 自动分配 seq_no = 项目内 max(seq_no)+1 - 新增 get_current_iteration(sor, pid):当前迭代 = status='in_progress' 唯一迭代 - 新增 start_next_iteration(pid):强制完成当前迭代 + 作废其活跃任务 + 启动下一个 planning 迭代 - list_iterations 按 seq_no 排序 2. sdlc_ability.py: 4 处 created_at 推断(默认迭代)收口到 get_current_iteration; 新增 start_next_iteration 工具;list_iterations 显示 seq_no + 当前迭代标记 3. agent_loop.py: PM 派发任务默认迭代收口到 get_current_iteration 4. agent_loop_v2.py: create_project 初始迭代 status 从非法的 'active' 改为 'in_progress' + seq_no=1
pipeline_service
产线执行引擎 —— 任务调度、步骤执行、人工任务交互、LLM 桥接。
功能
- 任务执行:DAG 步骤调度与状态机
- 人工任务:审批/输入等待与交互
- LLM 桥接:统一 LLM 调用接口
- Agent Loop:AI Agent 多轮任务执行
- 意图分类:自然语言意图识别
- 产物管理:步骤输入输出存储
数据表
| 表 | 说明 |
|---|---|
| pipeline_tasks | 任务实例 |
| pipeline_task_steps | 步骤执行记录 |
| pipeline_artifacts | 步骤产物 |
| pipeline_human_tasks | 人工任务 |
| pipeline_step_types | 步骤类型注册 |
安装
cd pkgs/pipeline-service && pip install .
核心模块
| 文件 | 职责 |
|---|---|
executor.py |
任务/步骤调度引擎 |
storage.py |
数据库读写 |
llm_bridge.py |
LLM API 调用 |
agent_loop.py |
AI Agent 多轮执行 |
human.py |
人工任务处理 |
intent_classifier.py |
意图识别 |
state.py |
状态机 |
step_registry.py |
步骤类型注册表 |
Description
Languages
Python
99.5%
Shell
0.5%