feat(protocols): MCP tool adapter + Tauri commands + initialize bug fix
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

S6 MCP Protocol:
- Fix McpTransport::initialize() — store actual server capabilities instead
  of discarding them and storing empty ServerCapabilities::default()
- Add send_notification() method to McpTransport for JSON-RPC notifications
- Send notifications/initialized after MCP handshake (spec requirement)
- Add McpToolAdapter: bridges MCP server tools into the tool execution path
- Add McpServiceManager: lifecycle management for MCP server connections
- Add 4 Tauri commands: mcp_start_service, mcp_stop_service,
  mcp_list_services, mcp_call_tool
- Register zclaw-protocols dependency in desktop Cargo.toml

New files:
- crates/zclaw-protocols/src/mcp_tool_adapter.rs (153 lines)
- desktop/src-tauri/src/kernel_commands/mcp.rs (145 lines)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
iven
2026-04-03 22:07:35 +08:00
parent cc26797faf
commit 943afe3b6b
7 changed files with 352 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ zclaw-skills = { workspace = true }
zclaw-hands = { workspace = true }
zclaw-pipeline = { workspace = true }
zclaw-growth = { workspace = true }
zclaw-protocols = { workspace = true }
# Tauri
tauri = { version = "2", features = [] }