```go {all|1-4|6-10|all}
type PipelineInput struct {
UserID, ProjectID, TaskID string
Prompt, AssetType string
StyleMap map[string]string
}
type PipelineState struct {
OptimizedPrompt string
ImageURL string
QualityPassed bool
RetryCount int
}
type PipelineOutput struct {
AssetURL string
Metadata map[string]any
}
```
-
`compose.NewGraph` 创建有向图,注册四节点。质检节点条件分支:通过 → 格式适配,不通过 → 回退提示词优化。
-
传入 `PipelineInput`,按拓扑顺序执行。每节点完成回调更新进度(5% → 25% → 60% → 80% → 100%)。