Skip to main content

synwire_agent/middleware/
pipeline.rs

1//! Pipeline middleware — exposes pipeline composition as agent tools.
2
3use synwire_core::agents::middleware::Middleware;
4use synwire_core::tools::Tool;
5
6/// Middleware that exposes pipeline execution tools to the agent.
7#[derive(Debug, Default)]
8pub struct PipelineMiddleware;
9
10impl Middleware for PipelineMiddleware {
11    fn name(&self) -> &'static str {
12        "pipeline"
13    }
14
15    fn tools(&self) -> Vec<Box<dyn Tool>> {
16        Vec::new()
17    }
18
19    fn system_prompt_additions(&self) -> Vec<String> {
20        vec![
21            "You have access to pipeline tools: execute_pipeline. Pipe commands together with stdin/stdout redirection.".to_string(),
22        ]
23    }
24}