* fix(tools): wire ActivatedToolSet into tool dispatch and spec advertisement When deferred MCP tools are activated via tool_search, they are stored in ActivatedToolSet but never consulted by the tool call loop. tool_specs is built once before the iteration loop and never refreshed, so the provider API tools[] parameter never includes activated tools. find_tool only searches the static registry, so execution dispatch also fails silently. Thread Arc<Mutex<ActivatedToolSet>> from creation sites through to run_tool_call_loop. Rebuild tool_specs each iteration to merge base registry specs with activated specs. Add fallback in execute_one_tool to check the activated set when the static registry lookup misses. Change ActivatedToolSet internal storage from Box<dyn Tool> to Arc<dyn Tool> so we can clone the Arc out of the mutex guard before awaiting tool.execute() (std::sync::MutexGuard is not Send). * fix(tools): add activated_tools field to new ChannelRuntimeContext test site |
||
|---|---|---|
| .. | ||
| agent.rs | ||
| classifier.rs | ||
| dispatcher.rs | ||
| loop_.rs | ||
| memory_loader.rs | ||
| mod.rs | ||
| prompt.rs | ||
| tests.rs | ||