refactor: 移除插件内存管理系统 + 新增工作流引擎
移除内容:
- 删除 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() 增加实例清理
This commit is contained in:
1 parent
115ce38370
commit
a7f64cd797
5 files changed
+982
-1014
No files matched your search
@@ -0,0 +1,31 @@
|
||||
# 示例工作流 - 代码质量检查与构建
|
||||
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}}"
|
||||
Reference in new issue
Block a user