use super::tools::ToolResult;
use crate::network::Rail;
use serde_json::{Map, Value, json};
#[must_use]
pub fn tool_entries() -> Vec<Value> {
vec![
json!({"name":"propose_template","description":"Propose the bound builder's command for its site. The server validates operator roots, hashes the file and holds exact path, digest, args, environment names and subjects for a person's approval.",
"inputSchema":{"type":"object","required":["service","command","args","env","stop_timeout_ms"],"additionalProperties":false,
"properties":{"service":{"type":"string"},"command":{"type":"string"},"args":{"type":"array","items":{"type":"string"}},
"env":{"type":"array","items":{"type":"string"}},"stop_timeout_ms":{"type":"integer","minimum":1},"operation":{"type":"string"}}}}),
]
}
#[must_use]
pub fn tool<R: Rail>(rail: &R, name: &str, arguments: &Map<String, Value>) -> Option<ToolResult> {
(name == "propose_template").then(|| super::plan_tools::forward(rail, name, arguments))
}
#[cfg(test)]
#[path = "template_tools_tests.rs"]
mod tests;