移除内容:
- 删除 plugin_memory_manager.py (TTL淘汰 + 懒加载系统)
- unified_tool_manager.py 精简为直接加载,去掉内存管理器集成
- tui.py 移除内存管理状态显示
新增内容:
- plugins/workflow.py: YAML 工作流引擎
- 顺序执行多步骤 (tool/shell/echo/wait/set/if)
- 步骤间变量传递 ({{steps.name.output}})
- 条件分支 (if/then/else)
- 错误处理 (continue_on_error / on_fail)
- 断点续跑 (状态持久化)
- 调用其他插件作为步骤
- workflows/example.yaml: 示例工作流
修复:
- unified_tool_manager.shutdown() 增加 graceful cleanup
- unregister_tool() 增加实例清理
32 lines
761 B
YAML
32 lines
761 B
YAML
# 示例工作流 - 代码质量检查与构建
|
|
name: code-quality
|
|
description: 代码质量检查、测试、构建的自动化流程
|
|
|
|
steps:
|
|
- name: info
|
|
type: echo
|
|
message: "🚀 开始代码质量检查流程"
|
|
|
|
- name: lint
|
|
type: shell
|
|
command: "echo '✓ 代码风格检查通过'"
|
|
continue_on_error: true
|
|
|
|
- name: test
|
|
type: shell
|
|
command: "echo '✓ 单元测试通过 (42/42)'"
|
|
continue_on_error: true
|
|
|
|
- name: check_results
|
|
type: echo
|
|
message: "Lint: {{lint.output}} | Test: {{test.output}}"
|
|
|
|
- name: build
|
|
type: shell
|
|
command: "echo '✓ 构建完成 → dist/'"
|
|
if: "{{lint.exit_code}} == 0"
|
|
|
|
- name: done
|
|
type: echo
|
|
message: "✅ 流程完成,构建产物: {{build.output}}"
|