| 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 个月前 |