├── a2a-agents
├── .gitignore
├── src
│ ├── lib.rs
│ └── reimbursement_agent
│ │ └── mod.rs
├── config.example.json
├── config.sqlx.example.json
├── config.auth.example.json
├── config.apikey.example.json
├── migrations
│ ├── 001_create_reimbursements_rollback.sql
│ ├── README.md
│ └── 001_create_reimbursements.sql
├── examples
│ ├── test_sqlx_storage.rs
│ ├── test_config_demo.rs
│ ├── test_metadata.rs
│ ├── test_handler.rs
│ └── test_metrics.rs
├── Cargo.toml
├── .env.example
└── templates
│ ├── tasks.html
│ ├── expense-form.html
│ └── index.html
├── a2a-rs
├── .gitignore
├── examples
│ ├── common
│ │ └── mod.rs
│ ├── builder_patterns.rs
│ └── sqlx_storage_demo.rs
├── tests
│ ├── common
│ │ └── mod.rs
│ └── property_based_test.proptest-regressions
├── src
│ ├── domain
│ │ ├── events
│ │ │ ├── mod.rs
│ │ │ └── task_events.rs
│ │ ├── protocols
│ │ │ ├── mod.rs
│ │ │ └── json_rpc.rs
│ │ ├── core
│ │ │ └── mod.rs
│ │ ├── mod.rs
│ │ ├── validation
│ │ │ └── mod.rs
│ │ ├── tests.rs
│ │ └── error.rs
│ ├── adapter
│ │ ├── transport
│ │ │ ├── mod.rs
│ │ │ ├── http
│ │ │ │ └── mod.rs
│ │ │ └── websocket
│ │ │ │ └── mod.rs
│ │ ├── storage
│ │ │ └── mod.rs
│ │ ├── error
│ │ │ ├── mod.rs
│ │ │ ├── server.rs
│ │ │ └── client.rs
│ │ ├── auth
│ │ │ └── mod.rs
│ │ ├── business
│ │ │ ├── mod.rs
│ │ │ └── message_handler.rs
│ │ └── mod.rs
│ ├── services
│ │ ├── mod.rs
│ │ ├── server.rs
│ │ └── client.rs
│ ├── application
│ │ ├── mod.rs
│ │ └── handlers
│ │ │ ├── mod.rs
│ │ │ ├── notification.rs
│ │ │ ├── message.rs
│ │ │ └── agent.rs
│ ├── port
│ │ ├── mod.rs
│ │ ├── message_handler.rs
│ │ └── authenticator.rs
│ └── lib.rs
├── migrations
│ ├── 002_v030_push_configs.sql
│ ├── 001_initial_schema.sql
│ └── 001_initial_schema_postgres.sql
├── Cargo.toml
└── README.md
├── a2a-ap2
├── src
│ └── main.rs
└── Cargo.toml
├── Cargo.toml
├── .vscode
└── mcp.json
├── a2a-client
├── src
│ ├── utils
│ │ ├── mod.rs
│ │ └── formatters.rs
│ ├── components
│ │ ├── mod.rs
│ │ └── task_viewer.rs
│ └── lib.rs
├── index.html
├── Cargo.toml
└── README.md
├── a2a-mcp
├── src
│ ├── transport
│ │ ├── mod.rs
│ │ ├── rmcp_to_a2a.rs
│ │ └── a2a_to_rmcp.rs
│ ├── adapter
│ │ ├── mod.rs
│ │ ├── agent_to_tool.rs
│ │ └── tool_to_agent.rs
│ ├── util.rs
│ ├── lib.rs
│ ├── error.rs
│ ├── client.rs
│ ├── tests
│ │ └── mod.rs
│ └── message.rs
├── Cargo.toml
├── README.md
└── examples
│ └── minimal_example.rs
├── .gitignore
├── spec
├── notifications.json
├── events.json
├── task.json
└── README.md
└── .github
└── workflows
└── rust.yml
/a2a-agents/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/a2a-rs/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 |
--------------------------------------------------------------------------------
/a2a-agents/src/lib.rs:
--------------------------------------------------------------------------------
1 | pub mod reimbursement_agent;
2 |
--------------------------------------------------------------------------------
/a2a-ap2/src/main.rs:
--------------------------------------------------------------------------------
1 | fn main() {
2 | println!("Hello, world!");
3 | }
4 |
--------------------------------------------------------------------------------
/Cargo.toml:
--------------------------------------------------------------------------------
1 | [workspace]
2 | resolver = "2"
3 | members = ["a2a-rs", "a2a-agents", "a2a-client", "a2a-ap2"]
4 |
--------------------------------------------------------------------------------
/a2a-ap2/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "a2a-ap2"
3 | version = "0.1.0"
4 | edition = "2024"
5 |
6 | [dependencies]
7 |
--------------------------------------------------------------------------------
/.vscode/mcp.json:
--------------------------------------------------------------------------------
1 | {
2 | "servers": {
3 | "datapilot": {
4 | "url": "http://localhost:7704/sse",
5 | "type": "sse"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/a2a-agents/config.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "host": "127.0.0.1",
3 | "http_port": 8080,
4 | "ws_port": 8081,
5 | "storage": {
6 | "type": "InMemory"
7 | }
8 | }
--------------------------------------------------------------------------------
/a2a-rs/examples/common/mod.rs:
--------------------------------------------------------------------------------
1 | //! Common utilities for examples
2 |
3 | pub mod simple_agent_handler;
4 |
5 | pub use simple_agent_handler::SimpleAgentHandler;
6 |
--------------------------------------------------------------------------------
/a2a-rs/tests/common/mod.rs:
--------------------------------------------------------------------------------
1 | //! Common test utilities
2 |
3 | pub mod test_handler;
4 |
5 | #[allow(unused_imports)]
6 | pub use test_handler::TestBusinessHandler;
7 |
8 |
--------------------------------------------------------------------------------
/a2a-client/src/utils/mod.rs:
--------------------------------------------------------------------------------
1 | //! Utility functions for A2A web clients
2 |
3 | pub mod formatters;
4 |
5 | pub use formatters::{format_message_content, format_task_state};
6 |
--------------------------------------------------------------------------------
/a2a-rs/src/domain/events/mod.rs:
--------------------------------------------------------------------------------
1 | //! Event types for streaming and notifications
2 |
3 | pub mod task_events;
4 |
5 | pub use task_events::{TaskArtifactUpdateEvent, TaskStatusUpdateEvent};
6 |
--------------------------------------------------------------------------------
/a2a-mcp/src/transport/mod.rs:
--------------------------------------------------------------------------------
1 | //! Transport adapters for A2A and RMCP protocols
2 |
3 | mod rmcp_to_a2a;
4 | mod a2a_to_rmcp;
5 |
6 | pub use rmcp_to_a2a::RmcpToA2aTransport;
7 | pub use a2a_to_rmcp::A2aToRmcpTransport;
--------------------------------------------------------------------------------
/a2a-mcp/src/adapter/mod.rs:
--------------------------------------------------------------------------------
1 | //! Adapters for converting between A2A and RMCP
2 |
3 | mod tool_to_agent;
4 | mod agent_to_tool;
5 |
6 | pub use tool_to_agent::ToolToAgentAdapter;
7 | pub use agent_to_tool::AgentToToolAdapter;
--------------------------------------------------------------------------------
/a2a-client/src/components/mod.rs:
--------------------------------------------------------------------------------
1 | //! Reusable web components for A2A interfaces
2 |
3 | pub mod streaming;
4 | pub mod task_viewer;
5 |
6 | pub use streaming::create_sse_stream;
7 | pub use task_viewer::{MessageView, TaskView};
8 |
--------------------------------------------------------------------------------
/a2a-rs/src/domain/protocols/mod.rs:
--------------------------------------------------------------------------------
1 | //! Protocol-specific types and implementations
2 |
3 | pub mod json_rpc;
4 |
5 | pub use json_rpc::{
6 | JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse,
7 | };
8 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target
2 | */target
3 | **/.claude/settings.local.json
4 | CLAUDE.md
5 | a2a-client/leptos/
6 |
7 | # Environment files
8 | .env
9 | .env.*
10 | *.env
11 |
12 | # Database files
13 | *.db
14 | *.db-shm
15 | *.db-wal
16 |
17 |
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/transport/mod.rs:
--------------------------------------------------------------------------------
1 | //! Transport protocol adapter implementations
2 |
3 | #[cfg(any(feature = "http-client", feature = "http-server"))]
4 | pub mod http;
5 |
6 | #[cfg(any(feature = "ws-client", feature = "ws-server"))]
7 | pub mod websocket;
8 |
--------------------------------------------------------------------------------
/a2a-agents/config.sqlx.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "host": "127.0.0.1",
3 | "http_port": 8080,
4 | "ws_port": 8081,
5 | "storage": {
6 | "type": "Sqlx",
7 | "url": "sqlite:reimbursement_tasks.db",
8 | "max_connections": 10,
9 | "enable_logging": false
10 | }
11 | }
--------------------------------------------------------------------------------
/a2a-agents/config.auth.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "host": "127.0.0.1",
3 | "http_port": 8080,
4 | "ws_port": 8081,
5 | "storage": {
6 | "type": "InMemory"
7 | },
8 | "auth": {
9 | "type": "BearerToken",
10 | "tokens": ["secret-token-123", "another-token-456"],
11 | "format": "JWT"
12 | }
13 | }
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/transport/http/mod.rs:
--------------------------------------------------------------------------------
1 | //! HTTP transport implementations
2 |
3 | #[cfg(feature = "http-client")]
4 | pub mod client;
5 |
6 | #[cfg(feature = "http-server")]
7 | pub mod server;
8 |
9 | // Re-export HTTP implementations
10 | #[cfg(feature = "http-client")]
11 | pub use client::HttpClient;
12 |
13 | #[cfg(feature = "http-server")]
14 | pub use server::HttpServer;
15 |
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/transport/websocket/mod.rs:
--------------------------------------------------------------------------------
1 | //! WebSocket transport implementations
2 |
3 | #[cfg(feature = "ws-client")]
4 | pub mod client;
5 |
6 | #[cfg(feature = "ws-server")]
7 | pub mod server;
8 |
9 | // Re-export WebSocket implementations
10 | #[cfg(feature = "ws-client")]
11 | pub use client::WebSocketClient;
12 |
13 | #[cfg(feature = "ws-server")]
14 | pub use server::WebSocketServer;
15 |
--------------------------------------------------------------------------------
/a2a-agents/config.apikey.example.json:
--------------------------------------------------------------------------------
1 | {
2 | "host": "127.0.0.1",
3 | "http_port": 8080,
4 | "ws_port": 8081,
5 | "storage": {
6 | "type": "Sqlx",
7 | "url": "sqlite:authenticated_tasks.db",
8 | "max_connections": 10,
9 | "enable_logging": false
10 | },
11 | "auth": {
12 | "type": "ApiKey",
13 | "keys": ["api-key-123", "api-key-456"],
14 | "location": "header",
15 | "name": "X-API-Key"
16 | }
17 | }
--------------------------------------------------------------------------------
/a2a-agents/src/reimbursement_agent/mod.rs:
--------------------------------------------------------------------------------
1 | //! Reimbursement agent implementation
2 |
3 | pub mod ai_client;
4 | pub mod config;
5 | pub mod handler;
6 | pub mod server;
7 | pub mod types;
8 |
9 | // Re-export key types for convenience
10 | pub use ai_client::{AiClient, AiConfig, ChatMessage};
11 | pub use config::{AuthConfig, ServerConfig, StorageConfig};
12 | pub use handler::ReimbursementHandler;
13 | pub use server::ReimbursementServer;
14 | pub use types::*;
15 |
--------------------------------------------------------------------------------
/a2a-rs/src/services/mod.rs:
--------------------------------------------------------------------------------
1 | //! Service layer for the A2A protocol
2 | //!
3 | //! Services provide application-level abstractions that orchestrate
4 | //! between ports and adapters.
5 |
6 | #[cfg(feature = "client")]
7 | pub mod client;
8 |
9 | #[cfg(feature = "server")]
10 | pub mod server;
11 |
12 | #[cfg(feature = "client")]
13 | pub use client::{AsyncA2AClient, StreamItem};
14 |
15 | #[cfg(feature = "server")]
16 | pub use server::{AgentInfoProvider, AsyncA2ARequestProcessor};
17 |
--------------------------------------------------------------------------------
/a2a-client/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | A2A Client with Leptos
7 |
8 |
9 |
10 |
15 |
16 |
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/storage/mod.rs:
--------------------------------------------------------------------------------
1 | //! Storage adapter implementations
2 |
3 | #[cfg(feature = "server")]
4 | pub mod task_storage;
5 |
6 | #[cfg(feature = "sqlx-storage")]
7 | pub mod sqlx_storage;
8 |
9 | #[cfg(feature = "sqlx-storage")]
10 | pub mod database_config;
11 |
12 | #[cfg(feature = "server")]
13 | pub use task_storage::InMemoryTaskStorage;
14 |
15 | #[cfg(feature = "sqlx-storage")]
16 | pub use sqlx_storage::SqlxTaskStorage;
17 |
18 | #[cfg(feature = "sqlx-storage")]
19 | pub use database_config::DatabaseConfig;
20 |
--------------------------------------------------------------------------------
/a2a-rs/tests/property_based_test.proptest-regressions:
--------------------------------------------------------------------------------
1 | # Seeds for failure cases proptest has generated in the past. It is
2 | # automatically read and these particular cases re-run before any
3 | # novel cases are generated.
4 | #
5 | # It is recommended to check this file in to source control so that
6 | # everyone who runs the test benefits from these saved cases.
7 | cc ce4d749c2667c10f423ff1d3977b3ad14b2edc0891de8320890dd52759e1c3bf # shrinks to task_id = " ", context_id = "¡", states = [Submitted, Submitted, Submitted, Submitted, Submitted, Submitted], messages = []
8 |
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/error/mod.rs:
--------------------------------------------------------------------------------
1 | //! Error types for adapter implementations
2 |
3 | #[cfg(feature = "client")]
4 | pub mod client;
5 |
6 | #[cfg(feature = "server")]
7 | pub mod server;
8 |
9 | // Re-export client error types
10 | #[cfg(feature = "http-client")]
11 | pub use client::HttpClientError;
12 | #[cfg(feature = "ws-client")]
13 | pub use client::WebSocketClientError;
14 |
15 | // Re-export server error types
16 | #[cfg(feature = "http-server")]
17 | pub use server::HttpServerError;
18 | #[cfg(feature = "ws-server")]
19 | pub use server::WebSocketServerError;
20 |
--------------------------------------------------------------------------------
/a2a-mcp/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "a2a-mcp"
3 | version = "0.1.0"
4 | edition = "2024"
5 | authors = ["A2A-RS Contributors"]
6 | description = "Integration between A2A Protocol and Rusty Model Context Protocol (RMCP)"
7 | license = "MIT OR Apache-2.0"
8 | repository = "https://github.com/username/a2a-rs"
9 | keywords = ["a2a", "rmcp", "ai", "agent", "protocol"]
10 | categories = ["ai", "network-programming"]
11 |
12 | # Simplify for initial implementation
13 | [dependencies]
14 | # We'll add more dependencies as needed in the future
15 | rmcp = { version = "0.1.5" }
16 | serde = { version = "1.0", features = ["derive"] }
17 | serde_json = "1.0"
18 |
19 | [dev-dependencies]
20 | # Simple test dependencies for now
21 |
--------------------------------------------------------------------------------
/a2a-agents/migrations/001_create_reimbursements_rollback.sql:
--------------------------------------------------------------------------------
1 | -- Rollback migration 001: Drop reimbursement tables
2 |
3 | -- Drop triggers first
4 | DROP TRIGGER IF EXISTS update_reimbursement_requests_updated_at;
5 | DROP TRIGGER IF EXISTS update_approval_workflow_updated_at;
6 |
7 | -- Drop indexes
8 | DROP INDEX IF EXISTS idx_reimbursement_requests_task_id;
9 | DROP INDEX IF EXISTS idx_reimbursement_requests_status;
10 | DROP INDEX IF EXISTS idx_reimbursement_requests_created_at;
11 | DROP INDEX IF EXISTS idx_receipts_request_id;
12 | DROP INDEX IF EXISTS idx_approval_workflow_request_id;
13 | DROP INDEX IF EXISTS idx_approval_workflow_status;
14 |
15 | -- Drop tables in reverse order of dependencies
16 | DROP TABLE IF EXISTS approval_workflow;
17 | DROP TABLE IF EXISTS receipts;
18 | DROP TABLE IF EXISTS reimbursement_requests;
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/auth/mod.rs:
--------------------------------------------------------------------------------
1 | //! Authentication adapter implementations
2 |
3 | #[cfg(any(feature = "http-server", feature = "ws-server"))]
4 | pub mod authenticator;
5 |
6 | #[cfg(feature = "auth")]
7 | pub mod jwt;
8 |
9 | #[cfg(feature = "auth")]
10 | pub mod oauth2;
11 |
12 | // Re-export authentication types
13 | #[cfg(any(feature = "http-server", feature = "ws-server"))]
14 | pub use authenticator::{
15 | ApiKeyAuthenticator, ApiKeyExtractor, BearerTokenAuthenticator, BearerTokenExtractor,
16 | NoopAuthenticator,
17 | };
18 |
19 | #[cfg(feature = "auth")]
20 | pub use jwt::{JwtAuthenticator, JwtExtractor};
21 |
22 | #[cfg(feature = "auth")]
23 | pub use oauth2::{OAuth2Authenticator, OAuth2Extractor, OpenIdConnectAuthenticator};
24 |
25 | #[cfg(feature = "http-server")]
26 | pub use authenticator::with_auth;
27 |
--------------------------------------------------------------------------------
/a2a-rs/src/application/mod.rs:
--------------------------------------------------------------------------------
1 | //! Application services for the A2A protocol
2 |
3 | pub mod handlers;
4 | pub mod json_rpc;
5 |
6 | // Re-export key types for convenience
7 | pub use json_rpc::{
8 | A2ARequest, CancelTaskRequest, CancelTaskResponse, GetTaskPushNotificationRequest,
9 | GetTaskPushNotificationResponse, GetTaskRequest, GetTaskResponse, SendMessageRequest,
10 | SendMessageResponse, SendMessageStreamingRequest, SendMessageStreamingResponse,
11 | SendTaskRequest, SendTaskResponse, SendTaskStreamingRequest, SendTaskStreamingResponse,
12 | SetTaskPushNotificationRequest, SetTaskPushNotificationResponse, TaskResubscriptionRequest,
13 | parse_request, serialize_request,
14 | };
15 |
16 | // Re-export JSON-RPC protocol types from domain for backward compatibility
17 | pub use crate::domain::{JSONRPCError, JSONRPCMessage, JSONRPCRequest, JSONRPCResponse};
18 |
--------------------------------------------------------------------------------
/a2a-rs/src/adapter/business/mod.rs:
--------------------------------------------------------------------------------
1 | //! Business logic adapter implementations
2 |
3 | #[cfg(feature = "server")]
4 | pub mod agent_info;
5 | #[cfg(feature = "server")]
6 | pub mod message_handler;
7 | #[cfg(feature = "server")]
8 | pub mod push_notification;
9 | #[cfg(feature = "server")]
10 | pub mod request_processor;
11 |
12 | // Re-export business implementations
13 | #[cfg(feature = "server")]
14 | pub use agent_info::SimpleAgentInfo;
15 | #[cfg(feature = "server")]
16 | pub use message_handler::DefaultMessageHandler;
17 | #[cfg(all(feature = "server", feature = "http-client"))]
18 | pub use push_notification::HttpPushNotificationSender;
19 | #[cfg(feature = "server")]
20 | pub use push_notification::{
21 | NoopPushNotificationSender, PushNotificationRegistry, PushNotificationSender,
22 | };
23 | #[cfg(feature = "server")]
24 | pub use request_processor::DefaultRequestProcessor;
25 |
--------------------------------------------------------------------------------
/a2a-rs/src/domain/core/mod.rs:
--------------------------------------------------------------------------------
1 | //! Core domain types for the A2A protocol
2 |
3 | pub mod agent;
4 | pub mod message;
5 | pub mod task;
6 |
7 | pub use agent::{
8 | AgentCapabilities, AgentCard, AgentCardSignature, AgentExtension, AgentInterface,
9 | AgentProvider, AgentSkill, AuthorizationCodeOAuthFlow, ClientCredentialsOAuthFlow,
10 | ImplicitOAuthFlow, OAuthFlows, PasswordOAuthFlow, PushNotificationAuthenticationInfo,
11 | PushNotificationConfig, SecurityScheme, TransportProtocol,
12 | };
13 | pub use message::{Artifact, FileContent, Message, Part, Role};
14 | pub use task::{
15 | DeleteTaskPushNotificationConfigParams, GetTaskPushNotificationConfigParams,
16 | ListTaskPushNotificationConfigParams, ListTasksParams, ListTasksResult,
17 | MessageSendConfiguration, MessageSendParams, Task, TaskIdParams, TaskPushNotificationConfig,
18 | TaskQueryParams, TaskSendParams, TaskState, TaskStatus,
19 | };
20 |
--------------------------------------------------------------------------------
/a2a-client/Cargo.toml:
--------------------------------------------------------------------------------
1 | [package]
2 | name = "a2a-client"
3 | version = "0.1.0"
4 | edition = "2024"
5 | rust-version = "1.85"
6 | authors = ["Emil Lindfors "]
7 | description = "Generic web client library for building A2A agent frontends"
8 | license = "MIT"
9 |
10 | [dependencies]
11 | # A2A integration
12 | # Note: We need "server" feature for the port traits even though this is a client library
13 | a2a-rs = { path = "../a2a-rs", features = ["http-client", "ws-client", "server", "tracing"], default-features = false }
14 |
15 | # Async runtime
16 | tokio = { version = "1", features = ["time"] }
17 |
18 | # Web framework
19 | axum = { version = "0.7", optional = true }
20 |
21 | # Serialization
22 | serde = { version = "1.0", features = ["derive"] }
23 | serde_json = "1.0"
24 |
25 | # Error handling
26 | anyhow = "1.0"
27 |
28 | # Logging
29 | tracing = "0.1"
30 |
31 | # Async streams
32 | futures = "0.3"
33 | async-stream = { version = "0.3", optional = true }
34 |
35 | [features]
36 | default = ["axum-components"]
37 | axum-components = ["dep:axum", "dep:async-stream"]
38 |
--------------------------------------------------------------------------------
/a2a-rs/src/application/handlers/mod.rs:
--------------------------------------------------------------------------------
1 | //! Request and response handlers for the A2A protocol
2 |
3 | pub mod agent;
4 | pub mod message;
5 | pub mod notification;
6 | pub mod task;
7 |
8 | pub use agent::{
9 | GetAuthenticatedExtendedCardRequest, GetAuthenticatedExtendedCardResponse,
10 | GetExtendedCardRequest, GetExtendedCardResponse,
11 | };
12 | pub use message::{
13 | SendMessageRequest, SendMessageResponse, SendMessageStreamingRequest,
14 | SendMessageStreamingResponse, SendTaskRequest, SendTaskResponse, SendTaskStreamingRequest,
15 | SendTaskStreamingResponse,
16 | };
17 | pub use notification::{
18 | GetTaskPushNotificationRequest, GetTaskPushNotificationResponse,
19 | SetTaskPushNotificationRequest, SetTaskPushNotificationResponse,
20 | };
21 | pub use task::{
22 | CancelTaskRequest, CancelTaskResponse, DeleteTaskPushNotificationConfigRequest,
23 | DeleteTaskPushNotificationConfigResponse, GetTaskPushNotificationConfigRequest,
24 | GetTaskPushNotificationConfigResponse, GetTaskRequest, GetTaskResponse,
25 | ListTaskPushNotificationConfigRequest, ListTaskPushNotificationConfigResponse,
26 | ListTasksRequest, ListTasksResponse, TaskResubscriptionRequest,
27 | };
28 |
--------------------------------------------------------------------------------
/a2a-rs/src/domain/mod.rs:
--------------------------------------------------------------------------------
1 | //! Domain models for the A2A protocol
2 |
3 | pub mod core;
4 | pub mod error;
5 | pub mod events;
6 | pub mod protocols;
7 | #[cfg(test)]
8 | mod tests;
9 | pub mod validation;
10 |
11 | // Re-export key types for convenience
12 | pub use core::{
13 | AgentCapabilities, AgentCard, AgentCardSignature, AgentExtension, AgentInterface,
14 | AgentProvider, AgentSkill, Artifact, AuthorizationCodeOAuthFlow, ClientCredentialsOAuthFlow,
15 | DeleteTaskPushNotificationConfigParams, FileContent, GetTaskPushNotificationConfigParams,
16 | ImplicitOAuthFlow, ListTaskPushNotificationConfigParams, ListTasksParams, ListTasksResult,
17 | Message, MessageSendConfiguration, MessageSendParams, OAuthFlows, Part, PasswordOAuthFlow,
18 | PushNotificationAuthenticationInfo, PushNotificationConfig, Role, SecurityScheme, Task,
19 | TaskIdParams, TaskPushNotificationConfig, TaskQueryParams, TaskSendParams, TaskState,
20 | TaskStatus, TransportProtocol,
21 | };
22 | pub use error::A2AError;
23 | pub use events::{TaskArtifactUpdateEvent, TaskStatusUpdateEvent};
24 | pub use protocols::{
25 | JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse,
26 | };
27 | pub use validation::{Validate, ValidationResult};
28 |
--------------------------------------------------------------------------------
/a2a-mcp/README.md:
--------------------------------------------------------------------------------
1 | # A2A-RMCP Integration
2 |
3 | A bridge between Agent-to-Agent (A2A) protocol and Rusty Model Context Protocol (RMCP)
4 |
5 | ## Overview
6 |
7 | This crate provides integration between the A2A protocol and RMCP, enabling bidirectional communication between these protocols. It follows a bridge pattern with adapter layers for message conversion and protocol translation.
8 |
9 | ## Key Features
10 |
11 | - Use A2A agents as RMCP tools
12 | - Expose RMCP tools as A2A agents
13 | - Bidirectional message conversion
14 | - State management across protocols
15 |
16 | ## Examples
17 |
18 | See the `examples` directory for working demonstrations:
19 |
20 | ```rust
21 | cargo run --example minimal_example
22 | ```
23 |
24 | ## Architecture
25 |
26 | ```text
27 | ┌─────────────────────────────────────────────┐
28 | │ a2a-mcp Crate │
29 | ├─────────────┬─────────────┬─────────────────┤
30 | │ RMCP Client │ Translation │ A2A Client │
31 | │ Interface │ Layer │ Interface │
32 | ├─────────────┼─────────────┼─────────────────┤
33 | │ RMCP Server │ Conversion │ A2A Server │
34 | │ Interface │ Layer │ Interface │
35 | └─────────────┴─────────────┴─────────────────┘
36 | ```
37 |
38 | ## Development Status
39 |
40 | See [TODO.md](TODO.md) for current implementation status and next steps.
--------------------------------------------------------------------------------
/a2a-rs/src/domain/events/task_events.rs:
--------------------------------------------------------------------------------
1 | use serde::{Deserialize, Serialize};
2 | use serde_json::{Map, Value};
3 |
4 | use crate::domain::core::{message::Artifact, task::TaskStatus};
5 |
6 | /// Event for task status updates
7 | #[derive(Debug, Clone, Serialize, Deserialize)]
8 | pub struct TaskStatusUpdateEvent {
9 | #[serde(rename = "taskId")]
10 | pub task_id: String,
11 | #[serde(rename = "contextId")]
12 | pub context_id: String,
13 | pub kind: String, // Always "status-update"
14 | pub status: TaskStatus,
15 | #[serde(rename = "final")]
16 | pub final_: bool,
17 | #[serde(skip_serializing_if = "Option::is_none")]
18 | pub metadata: Option