feat(pipeline): implement Pipeline DSL system for automated workflows
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

Add complete Pipeline DSL system including:
- Rust backend (zclaw-pipeline crate) with parser, executor, and state management
- Frontend components: PipelinesPanel, PipelineResultPreview, ClassroomPreviewer
- Pipeline recommender for Agent conversation integration
- 5 pipeline templates: education, marketing, legal, research, productivity
- Documentation for Pipeline DSL architecture

Pipeline DSL enables declarative workflow definitions with:
- YAML-based configuration
- Expression resolution (${inputs.topic}, ${steps.step1.output})
- LLM integration, parallel execution, file export
- Agent smart recommendations in conversations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-03-25 00:52:12 +08:00
parent 0179f947aa
commit 9c781f5f2a
30 changed files with 6944 additions and 24 deletions

View File

@@ -0,0 +1,56 @@
//! ZCLAW Pipeline Engine
//!
//! Declarative pipeline system for multi-step automation workflows.
//! Pipelines orchestrate Skills and Hands to accomplish complex tasks.
//!
//! # Architecture
//!
//! ```text
//! Pipeline YAML → Parser → Pipeline struct → Executor → Output
//! ↓
//! ExecutionContext (state)
//! ```
//!
//! # Example
//!
//! ```yaml
//! apiVersion: zclaw/v1
//! kind: Pipeline
//! metadata:
//! name: classroom-generator
//! displayName: 互动课堂生成器
//! category: education
//! spec:
//! inputs:
//! - name: topic
//! type: string
//! required: true
//! steps:
//! - id: parse
//! action: llm.generate
//! template: skills/classroom/parse.md
//! output: parsed
//! - id: render
//! action: classroom.render
//! input: ${steps.parse.output}
//! output: result
//! outputs:
//! classroom_id: ${steps.render.output.id}
//! ```
pub mod types;
pub mod parser;
pub mod state;
pub mod executor;
pub mod actions;
pub use types::*;
pub use parser::*;
pub use state::*;
pub use executor::*;
pub use actions::ActionRegistry;
/// Convenience function to parse pipeline YAML
pub fn parse_pipeline_yaml(yaml: &str) -> Result<Pipeline, parser::ParseError> {
parser::PipelineParser::parse(yaml)
}