Files
zclaw_openfang/crates/zclaw-protocols/src/lib.rs
iven 943afe3b6b
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
feat(protocols): MCP tool adapter + Tauri commands + initialize bug fix
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>
2026-04-03 22:07:35 +08:00

21 lines
498 B
Rust

//! ZCLAW Protocols
//!
//! Protocol support for MCP (Model Context Protocol) and A2A (Agent-to-Agent).
//!
//! A2A is gated behind the `a2a` feature flag (reserved for future multi-agent scenarios).
//! MCP is always available as a framework for tool integration.
mod mcp;
mod mcp_types;
mod mcp_tool_adapter;
mod mcp_transport;
#[cfg(feature = "a2a")]
mod a2a;
pub use mcp::*;
pub use mcp_types::*;
pub use mcp_tool_adapter::*;
pub use mcp_transport::*;
#[cfg(feature = "a2a")]
pub use a2a::*;