| 82 | /// Create a proxy to the global tool registry |
| 83 | #[staticmethod] |
| 84 | pub fn new_global_proxy() -> Self { |
| 85 | // Get the global registry from the decorator module |
| 86 | use crate::tools::decorator::get_global_registry; |
| 87 | let global_registry = get_global_registry(); |
| 88 | let registry_guard = global_registry.lock().unwrap(); |
| 89 | |
| 90 | // Return a clone that shares the same underlying data |
| 91 | Self { |
| 92 | tools: registry_guard.tools.clone(), |
| 93 | metadata: registry_guard.metadata.clone(), |
| 94 | execution_history: registry_guard.execution_history.clone(), |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /// Register a tool function with metadata |
| 99 | pub fn register_tool( |