mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
fix(rebase): send MCP initialize once and align python deps with upstream
The merge-rebase kept both the old downstream MCP initialize dispatch and upstream's relocated one, so every capable device received two initialize messages per connection. Keep only the post-hello send (upstream #3347). requirements: drop chardet (removed upstream, unused here), restore mcp-proxy 0.12.0, and remove the stale cozepy pin comment (cozepy is not a downstream dependency).
This commit is contained in:
parent
f92fb3439a
commit
cfe3da5c7b
2 changed files with 3 additions and 5 deletions
|
|
@ -54,12 +54,11 @@ async def handleHelloMessage(conn: "ConnectionHandler", msg_json):
|
||||||
if features.get("mcp"):
|
if features.get("mcp"):
|
||||||
conn.logger.bind(tag=TAG).debug("Client supports MCP")
|
conn.logger.bind(tag=TAG).debug("Client supports MCP")
|
||||||
conn.mcp_client = MCPClient()
|
conn.mcp_client = MCPClient()
|
||||||
# Send the MCP initialization message.
|
|
||||||
asyncio.create_task(send_mcp_initialize_message(conn))
|
|
||||||
|
|
||||||
await conn.websocket.send(json.dumps(conn.welcome_msg))
|
await conn.websocket.send(json.dumps(conn.welcome_msg))
|
||||||
|
|
||||||
# The device waits for the server hello before processing MCP messages.
|
# The device waits for the server hello before processing MCP messages.
|
||||||
|
# Send the MCP initialization message exactly once, after the hello reply.
|
||||||
if features and features.get("mcp"):
|
if features and features.get("mcp"):
|
||||||
asyncio.create_task(send_mcp_initialize_message(conn))
|
asyncio.create_task(send_mcp_initialize_message(conn))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
torch==2.4.1
|
torch==2.4.1
|
||||||
torchaudio==2.4.1
|
torchaudio==2.4.1
|
||||||
numpy>=2.0.2
|
numpy>=2.0.2
|
||||||
#--------- cozepy 0.20.0 requires websockets<15.0.0; the pin below is not recommended to upgrade yet
|
#--------- websockets pin
|
||||||
websockets==16.0
|
websockets==16.0
|
||||||
#--------- Dependencies below are eligible for upgrades
|
#--------- Dependencies below are eligible for upgrades
|
||||||
pyyml==0.0.2
|
pyyml==0.0.2
|
||||||
|
|
@ -28,10 +28,9 @@ bs4==0.0.2
|
||||||
cryptography==46.0.6
|
cryptography==46.0.6
|
||||||
mcp==1.22.0
|
mcp==1.22.0
|
||||||
PySocks==1.7.1
|
PySocks==1.7.1
|
||||||
chardet==5.2.0
|
|
||||||
aioconsole==0.8.2
|
aioconsole==0.8.2
|
||||||
markitdown==0.1.3
|
markitdown==0.1.3
|
||||||
mcp-proxy==0.10.0
|
mcp-proxy==0.12.0
|
||||||
PyJWT==2.12.1
|
PyJWT==2.12.1
|
||||||
psutil==7.2.2
|
psutil==7.2.2
|
||||||
portalocker==3.2.0
|
portalocker==3.2.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue