zeroclaw/src/agent
Argenis 18a456b24e
fix(mcp): wire MCP tools into WebSocket chat and gateway /api/tools (#4096)
* fix(mcp): wire MCP tools into WebSocket chat path and gateway /api/tools

Agent::from_config() did not initialize MCP tools because it was
synchronous and MCP connection requires async. The gateway tool
registry built for /api/tools also missed MCP tools for the same
reason.

Changes:
- Make Agent::from_config() async so it can call McpRegistry::connect_all()
- Add MCP tool initialization (both eager and deferred modes) to
  from_config(), following the same pattern used in loop_.rs CLI/webhook paths
- Add MCP tool initialization to the gateway's tool registry so
  /api/tools reflects MCP tools
- Update all three call sites (run(), handle_socket, test) to await

Closes #4042

* fix: merge master and fix formatting

* fix: remove underscore prefix from used bindings (clippy)
2026-03-21 05:13:01 -04:00
..
agent.rs fix(mcp): wire MCP tools into WebSocket chat and gateway /api/tools (#4096) 2026-03-21 05:13:01 -04:00
classifier.rs feat(agent): log query classification route decisions 2026-02-24 16:02:59 +08:00
dispatcher.rs fix(agent): prevent duplicate tool schema injection in XML dispatcher (#3744) 2026-03-16 18:38:44 -04:00
loop_.rs feat(hardware): add RPi GPIO, Aardvark I2C/SPI/GPIO, and hardware plugin system (#4125) 2026-03-21 04:17:01 -04:00
memory_loader.rs fix(memory): filter autosave noise and scope recall/store by session (#3695) 2026-03-16 16:36:35 -04:00
mod.rs feat(agent): add rule-based query classification for automatic model routing 2026-02-18 14:41:58 +08:00
prompt.rs fix(prompt): respect autonomy level in SafetySection (Agent/gateway WS path) (#3952) (#4037) 2026-03-20 18:22:35 -04:00
tests.rs fix(agent): prevent duplicate tool schema injection in XML dispatcher (#3744) 2026-03-16 18:38:44 -04:00