epic: Pipeline 编排层原语 — run / parallel / judge / transform / foreach #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
概述
Pipeline 新增编排层原语后,需要界定它的能力边界、补齐文档和校验,并决定与 DSL/Compiler 体系如何对接。
之前已实现(commit
eb21a49):run— 按角色驱动 Agent(AgentCapability 契约)parallel— 并行分支judge— context 值条件分支transform— 字段映射foreach— 列表迭代待办
1. 原语语义定义(需要讨论)
judge的条件表达式语法:仅等值匹配?还是支持 > / < / regex / expr?foreach的 context 隔离:子步骤修改 context 会影响外层吗?还是写时复制?parallel的结果合并策略:同名 key 冲突时怎么处理?run的input和output_key是约定还是强制校验?2. 引擎性能优化
_wait_for_state用asyncio.sleep(0.1)轮询 Agent 状态,改为asyncio.Event事件驱动,Agent 完成时触发事件,Pipeline 等待事件而非轮询status和errors,扩展为每步记录start_time/end_time/input_snapshot/output_snapshot/error,方便调试编排层逻辑3. 模板注册机制
4. 与 Compiler 对接
5. 契约系统归属