syncable_cli/agent/tools/mod.rs
1//! Agent tools using Rig's Tool trait
2//!
3//! These tools wrap existing CLI functionality for the agent to use.
4//!
5//! ## Available Tools
6//!
7//! ### File Operations
8//! - `ReadFileTool` - Read file contents
9//! - `WriteFileTool` - Write single files (Dockerfiles, Terraform, etc.)
10//! - `WriteFilesTool` - Write multiple files (Terraform modules, Helm charts)
11//! - `ListDirectoryTool` - List directory contents
12//!
13//! ### Analysis
14//! - `AnalyzeTool` - Analyze project architecture, dependencies, build commands
15//!
16//! ### Security
17//! - `SecurityScanTool` - Security vulnerability scanning
18//! - `VulnerabilitiesTool` - Dependency vulnerability checking
19//!
20//! ### Linting
21//! - `HadolintTool` - Native Dockerfile linting (best practices, security)
22//! - `DclintTool` - Native Docker Compose linting (best practices, style, security)
23//! - `HelmlintTool` - Native Helm chart structure/template linting
24//! - `KubelintTool` - Native Kubernetes manifest security/best practice linting
25//!
26//! ### Resource Optimization
27//! - `K8sOptimizeTool` - Kubernetes resource right-sizing and cost optimization
28//! - `K8sCostsTool` - Kubernetes workload cost attribution and analysis
29//! - `K8sDriftTool` - Detect configuration drift between manifests and cluster
30//!
31//! ### Prometheus Integration (for live K8s analysis)
32//! - `PrometheusDiscoverTool` - Discover Prometheus services in Kubernetes cluster
33//! - `PrometheusConnectTool` - Establish connection to Prometheus (port-forward or URL)
34//! - `BackgroundProcessManager` - Manage long-running background processes
35//!
36//! ### Helm vs Kubernetes Linting
37//! - **HelmlintTool**: Use for Helm chart development - validates Chart.yaml, values.yaml,
38//! Go template syntax, and Helm-specific best practices. Works on chart directories.
39//! - **KubelintTool**: Use for K8s security - checks rendered manifests for privileged containers,
40//! missing probes, RBAC issues, resource limits. Works on YAML files, Helm charts (renders them),
41//! and Kustomize directories.
42//!
43//! ### Diagnostics
44//! - `DiagnosticsTool` - Check for code errors via IDE/LSP or language-specific commands
45//!
46//! ### Terraform
47//! - `TerraformFmtTool` - Format Terraform configuration files
48//! - `TerraformValidateTool` - Validate Terraform configurations
49//! - `TerraformInstallTool` - Install Terraform CLI (auto-detects OS)
50//!
51//! ### Shell
52//! - `ShellTool` - Execute validation commands (docker build, terraform validate, helm lint)
53//!
54//! ### Planning (Forge-style workflow)
55//! - `PlanCreateTool` - Create structured plan files with task checkboxes
56//! - `PlanNextTool` - Get next pending task and mark it in-progress
57//! - `PlanUpdateTool` - Update task status (done, failed)
58//! - `PlanListTool` - List all available plan files
59//!
60//! ### Web
61//! - `WebFetchTool` - Fetch content from URLs (converts HTML to markdown)
62//!
63mod analyze;
64pub mod background;
65pub mod compression;
66mod dclint;
67mod diagnostics;
68mod fetch;
69mod file_ops;
70mod hadolint;
71mod helmlint;
72mod k8s_costs;
73mod k8s_drift;
74mod k8s_optimize;
75mod kubelint;
76pub mod output_store;
77mod plan;
78mod prometheus_connect;
79mod prometheus_discover;
80mod retrieve;
81mod security;
82mod shell;
83mod terraform;
84mod truncation;
85
86pub use truncation::{TruncationLimits, truncate_json_output};
87
88// Smart compression exports
89pub use compression::{CompressionConfig, compress_analysis_output, compress_tool_output};
90pub use retrieve::{ListOutputsTool, RetrieveOutputTool};
91
92pub use analyze::AnalyzeTool;
93pub use background::BackgroundProcessManager;
94pub use dclint::DclintTool;
95pub use diagnostics::DiagnosticsTool;
96pub use fetch::WebFetchTool;
97pub use file_ops::{ListDirectoryTool, ReadFileTool, WriteFileTool, WriteFilesTool};
98pub use hadolint::HadolintTool;
99pub use helmlint::HelmlintTool;
100pub use k8s_costs::K8sCostsTool;
101pub use k8s_drift::K8sDriftTool;
102pub use k8s_optimize::K8sOptimizeTool;
103pub use kubelint::KubelintTool;
104pub use plan::{PlanCreateTool, PlanListTool, PlanNextTool, PlanUpdateTool};
105pub use prometheus_connect::PrometheusConnectTool;
106pub use prometheus_discover::PrometheusDiscoverTool;
107pub use security::{SecurityScanTool, VulnerabilitiesTool};
108pub use shell::ShellTool;
109pub use terraform::{TerraformFmtTool, TerraformInstallTool, TerraformValidateTool};