xiaozhi-esp32-server/main/xiaozhi-server/core/providers/tools
Brad Shannon 4a2ba64985 fix(mcp): handle null JSON-RPC id without aborting the handshake
`id` is optional in JSON-RPC and may legitimately be `null`. The previous
`int(payload.get("id", 0))` only defaults when the key is absent — a present
`"id": null` reaches `int(None)` and raises TypeError. The exception
propagates out of the message handler, the MCP handshake never completes, and
the session is left with ready=False (no device tools) and no clear error.

Use `or 0` so both the missing-key and explicit-null cases collapse to 0.
Applies to the result and error branches.
2026-06-18 11:01:03 -04:00
..
base update:完成mcp接入点对接 2025-06-26 16:25:39 +08:00
device_iot feat: 为多个模块添加类型注解以增强代码可读性 2026-01-25 17:47:52 +08:00
device_mcp fix(mcp): handle null JSON-RPC id without aborting the handshake 2026-06-18 11:01:03 -04:00
mcp_endpoint update:默认版本不提供设备ID敏感信息,按需开启 2025-10-28 15:02:01 +08:00
server_mcp update:超时时间更改为10秒,并且删去无用的模块导入 2025-12-22 16:38:28 +08:00
server_plugins perf: 2026-05-12 15:16:08 +08:00
__init__.py update:优化工具目录结构 2025-06-26 09:28:29 +08:00
unified_tool_handler.py update:在设备端显示工具调用信息 2026-03-16 13:11:45 +08:00
unified_tool_manager.py 优化日志级别,生产环境中INFO避免打印过多日志 2025-11-11 18:52:14 +08:00