use crate::types::*;
use super::constants::WORKFLOW_TOOL_NAME;
pub struct WorkflowTool;
impl WorkflowTool {
pub fn new() -> Self {
Self
}
pub fn name(&self) -> &str {
WORKFLOW_TOOL_NAME
}
pub fn description(&self) -> &str {
"Manage workflows (not implemented)"
}
pub fn input_schema(&self) -> ToolInputSchema {
ToolInputSchema {
schema_type: "object".to_string(),
properties: serde_json::json!({}),
required: None,
}
}
pub async fn execute(
&self,
_input: serde_json::Value,
_context: &ToolContext,
) -> Result<ToolResult, crate::error::AgentError> {
Err(crate::error::AgentError::ToolNotImplemented(
"Workflow tool is not implemented".to_string(),
))
}
}
impl Default for WorkflowTool {
fn default() -> Self {
Self::new()
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_workflow_tool_name() {
let tool = WorkflowTool::new();
assert_eq!(tool.name(), WORKFLOW_TOOL_NAME);
}
#[test]
fn test_workflow_tool_schema() {
let tool = WorkflowTool::new();
let schema = tool.input_schema();
assert_eq!(schema.schema_type, "object");
}
}