Skip to content

Commit 0fa8351

Browse files
initcronclaude
andcommitted
fix: Register docker_stats tool in runtime
The docker_stats tool was implemented but not registered in the runtime, so it wasn't available to agents. Changes: - Added docker_stats to system_tools list in runtime.rs - Added docker_stats registration case in create_system_executor - Exported DockerStatsTool from aof-tools lib.rs Now agents can use: tools: - docker_stats The tool automatically uses --no-stream flag to avoid timeouts. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9426ad2 commit 0fa8351

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

crates/aof-runtime/src/executor/runtime.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Runtime {
121121
"kubectl_get", "kubectl_apply", "kubectl_delete", "kubectl_logs",
122122
"kubectl_exec", "kubectl_describe",
123123
// Legacy docker tools
124-
"docker_ps", "docker_logs", "docker_build", "docker_run",
124+
"docker_ps", "docker_stats", "docker_logs", "docker_build", "docker_run",
125125
"docker_exec", "docker_images",
126126
// Legacy git tools
127127
"git_status", "git_diff", "git_log", "git_commit", "git_branch",
@@ -806,6 +806,9 @@ fn create_builtin_executor_for_tools(tool_names: &[String]) -> Arc<dyn ToolExecu
806806
"docker_ps" => {
807807
registry.register(aof_tools::DockerPsTool::new());
808808
}
809+
"docker_stats" => {
810+
registry.register(aof_tools::DockerStatsTool::new());
811+
}
809812
"docker_build" => {
810813
registry.register(aof_tools::DockerBuildTool::new());
811814
}

crates/aof-tools/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub use tools::observability::{ObservabilityTools, PrometheusQueryTool, LokiQuer
9696
pub use tools::kubectl::{KubectlTools, KubectlGetTool, KubectlApplyTool, KubectlDeleteTool, KubectlLogsTool, KubectlExecTool, KubectlDescribeTool};
9797

9898
#[cfg(feature = "docker")]
99-
pub use tools::docker::{DockerTools, DockerPsTool, DockerBuildTool, DockerRunTool, DockerLogsTool, DockerExecTool, DockerImagesTool};
99+
pub use tools::docker::{DockerTools, DockerPsTool, DockerStatsTool, DockerBuildTool, DockerRunTool, DockerLogsTool, DockerExecTool, DockerImagesTool};
100100

101101
#[cfg(feature = "git")]
102102
pub use tools::git::{GitTools, GitStatusTool, GitDiffTool, GitLogTool, GitCommitTool, GitBranchTool, GitCheckoutTool, GitPullTool, GitPushTool};

0 commit comments

Comments
 (0)