mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-25 04:29:51 +01:00
握手阶段写死 id=1 (initialize) / id=2 (tools/list),但 MCPClient.next_id 从 1 起算,导致前两次 tools/call 复用同一连接上的 request id。合规设备端 会拒收并触发服务端 30s 超时(表现为前两次调用失败、第三次起恢复)。 将 next_id 初始值改为 3,与官方协议序列及 #3461 复现一致;同时去掉 mcp_handler 里重复的 MCPClient 定义,改为从 mcp_client 导入。 Fixes #3461 Co-authored-by: shinjiyu <shinjiyu@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| base | ||
| device_iot | ||
| device_mcp | ||
| mcp_endpoint | ||
| server_mcp | ||
| server_plugins | ||
| __init__.py | ||
| unified_tool_handler.py | ||
| unified_tool_manager.py | ||