Ttangmeng1234mcp: add HTTP transport for remote MCP clients Add HTTP transport to mcp_server alongside existing stdio transport. Remote MCP clients can now discover and call all device tools via standard MCP protocol over POST /mcp on the ws_server port (28789). - mcp_server.c: add HTTP JSON-RPC handler (initialize, tools/list, tools/call) bridging to main tool_registry - mcp_server.h: declare mcp_server_try_handle_http() - ws_server.c: add MCP to request routing chain (A2A -> MCP -> WS)
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
mcp: add HTTP transport for remote MCP clients Add HTTP transport to mcp_server alongside existing stdio transport. Remote MCP clients can now discover and call all device tools via standard MCP protocol over POST /mcp on the ws_server port (28789). - mcp_server.c: add HTTP JSON-RPC handler (initialize, tools/list, tools/call) bridging to main tool_registry - mcp_server.h: declare mcp_server_try_handle_http() - ws_server.c: add MCP to request routing chain (A2A -> MCP -> WS) | 1 个月前 | |
Initial commit | 2 个月前 | |
feat: add A2A protocol handler (Server + Client) Add A2A (Agent-to-Agent) protocol support, enabling phone-side agents to discover and invoke device capabilities via HTTP. Server role (shared port with ws_server): - GET /.well-known/agent.json — AgentCard from tool_registry - POST /a2a/invoke — routes through agent_loop (LLM + tools) - GET /a2a/health — health check Client role (for calling remote agents): - a2a_client_discover() — fetch remote AgentCard - a2a_client_invoke() — invoke remote agent skill - a2a_client_health() — check remote agent health Key design decisions: - Invoke goes through message_bus + mbus_tap for full agent processing (LLM reasoning + tool calls), not direct tool exec - Per-request tap key (fd-based) supports concurrent requests - Heap-allocated ctx with done-flag prevents use-after-free on timeout Also fix: skip mallinfo() when CONFIG_DEBUG_MM is enabled to avoid assert in mm_foreach on QEMU tmpfs-only configurations. Verified on QEMU: health, agent_card, invoke (agent_loop path) all pass end-to-end. Signed-off-by: zhouwenjie1 <zhouwenjie1@xiaomi.com> | 1 个月前 | |
feat: add A2A protocol handler (Server + Client) Add A2A (Agent-to-Agent) protocol support, enabling phone-side agents to discover and invoke device capabilities via HTTP. Server role (shared port with ws_server): - GET /.well-known/agent.json — AgentCard from tool_registry - POST /a2a/invoke — routes through agent_loop (LLM + tools) - GET /a2a/health — health check Client role (for calling remote agents): - a2a_client_discover() — fetch remote AgentCard - a2a_client_invoke() — invoke remote agent skill - a2a_client_health() — check remote agent health Key design decisions: - Invoke goes through message_bus + mbus_tap for full agent processing (LLM reasoning + tool calls), not direct tool exec - Per-request tap key (fd-based) supports concurrent requests - Heap-allocated ctx with done-flag prevents use-after-free on timeout Also fix: skip mallinfo() when CONFIG_DEBUG_MM is enabled to avoid assert in mm_foreach on QEMU tmpfs-only configurations. Verified on QEMU: health, agent_card, invoke (agent_loop path) all pass end-to-end. Signed-off-by: zhouwenjie1 <zhouwenjie1@xiaomi.com> | 1 个月前 | |
fix: use claw_config_set to clear vision config and fix syslog race - Replace config_del with claw_config_set(key, "") per review feedback, using the public API instead of the non-public config_del function - Move syslog before pthread_mutex_unlock to avoid reading s_vision_model/s_vision_host after lock release Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> | 2 个月前 | |
Initial commit | 2 个月前 | |
fix(node): fix critical bugs in node_client WebSocket client - P0: Add NULL check for cJSON_PrintUnformatted() return value in send_json_request() to prevent crash on OOM - P0: Add pthread_mutex to protect shared state (s_ws, config globals), use two-phase disconnect (shutdown fd first, free TLS after join) to eliminate race between teardown and active mbedtls_ssl_read, replace detached thread with joinable thread + pthread_join - P1: Check entropy_func() return value at all call sites (ws_send_text mask, do_connect WS key, ws_recv_frame pong, main loop ping) to fail safely on entropy failure Signed-off-by: zhouwenjie1 <zhouwenjie1@xiaomi.com> | 2 个月前 | |
mcp: add HTTP transport for remote MCP clients Add HTTP transport to mcp_server alongside existing stdio transport. Remote MCP clients can now discover and call all device tools via standard MCP protocol over POST /mcp on the ws_server port (28789). - mcp_server.c: add HTTP JSON-RPC handler (initialize, tools/list, tools/call) bridging to main tool_registry - mcp_server.h: declare mcp_server_try_handle_http() - ws_server.c: add MCP to request routing chain (A2A -> MCP -> WS) | 1 个月前 | |
Initial commit | 2 个月前 | |
Initial commit | 2 个月前 | |
feat: add XiaoZhi WebSocket protocol channel Add XiaoZhi channel for connecting to XiaoZhi Server via WSS. Single WebSocket connection handles JSON control messages (text frames) and Opus audio (binary frames). Modules: - xiaozhi_channel: OTA config fetch, WSS connect, hello/STT/TTS/ LLM/MCP message dispatch, auto-reconnect with exponential backoff - xiaozhi_opus: Opus codec wrapper with real/stub implementations - xiaozhi_udp: UDP audio transport with AES-CTR encryption Thread safety fixes applied: locked start/stop guards, session_id snapshot in send functions, aligned memory access in UDP nonce. Add Kconfig option AI_AGENT_XIAOZHI and CMakeLists.txt conditional. Signed-off-by: zhouwenjie1 <zhouwenjie1@xiaomi.com> | 1 个月前 | |
Initial commit | 2 个月前 |