Skip to main content

synwire_agent/middleware/
archive.rs

1//! Archive middleware — exposes archive operations as agent tools.
2
3use synwire_core::agents::middleware::Middleware;
4use synwire_core::tools::Tool;
5
6/// Middleware that exposes archive tools to the agent.
7#[derive(Debug, Default)]
8pub struct ArchiveMiddleware;
9
10impl Middleware for ArchiveMiddleware {
11    fn name(&self) -> &'static str {
12        "archive"
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 archive tools: create_archive, extract_archive, list_archive. Supported formats: tar, tar.gz, zip.".to_string(),
22        ]
23    }
24}