Fix schema-guided tool parameter coercion (#1143)

* Fix schema-guided tool parameter coercion

* Fix CI checks for coercion regression tests

* Finish panic-scan annotations

* Avoid redundant worker param preparation

* Keep panic-scan annotations rustfmt-stable

* Handle nullable WASM schema review feedback

* Address param coercion review notes
This commit is contained in:
Henry Park
2026-03-14 16:27:18 -07:00
committed by GitHub
parent fda5160940
commit c79754df28
9 changed files with 1025 additions and 193 deletions
+3 -2
View File
@@ -43,8 +43,8 @@ use crate::error::ToolError as AgentToolError;
use crate::llm::{
ChatMessage, LlmProvider, Reasoning, ReasoningContext, RespondResult, ToolDefinition,
};
use crate::tools::ToolRegistry;
use crate::tools::tool::{ApprovalRequirement, Tool, ToolError, ToolOutput};
use crate::tools::{ToolRegistry, prepare_tool_params};
/// Requirement specification for building software.
#[derive(Debug, Clone, Serialize, Deserialize)]
@@ -776,10 +776,11 @@ Create alongside the .wasm file to grant capabilities:
self.tools.get(tool_name).await.ok_or_else(|| {
ToolError::ExecutionFailed(format!("Tool not found: {}", tool_name))
})?;
let normalized_params = prepare_tool_params(tool.as_ref(), params);
// Execute with a dummy context (build tools don't need job context)
let ctx = JobContext::default();
tool.execute(params.clone(), &ctx).await
tool.execute(normalized_params, &ctx).await
}
/// Find the build artifact based on project type.