Skip to main content

protocol_droid/domain/a2a/
mod.rs

1//! A2A domain — the version negotiation model, the per-revision
2//! `A2aFeatureProfile`, and the value objects that the wire
3//! codecs (T28) lower into.
4//!
5//! # Where this fits in the protocol-neutral core
6//!
7//! The protocol-neutral core in `domain/jsonrpc` and
8//! `application/session` already speaks JSON-RPC 2.0 — the same
9//! envelope A2A uses. T27 is a *feature* on top of that core: a
10//! per-revision codec (T08-style) and a per-revision
11//! `A2aFeatureProfile` (T05-style) that mirrors the MCP gating
12//! model. A future MCP↔A2A bridge (T28) is the consumer of both
13//! profiles; this module is what the bridge translates *between*.
14//!
15//! # The seam
16//!
17//! `A2aVersion` is the only thing this module re-exports at the
18//! top level. The `A2aFeatureProfile` lives in `a2a::feature` and
19//! the per-revision wire types live under `a2a::wire::v1_0`. A
20//! codec for v1.0 implements the protocol-neutral
21//! `application/jsonrpc::Codec` trait so the dispatcher routes
22//! the same way it does for MCP.
23
24pub mod agent_card;
25pub mod extended_agent_card;
26pub mod feature;
27pub mod list_tasks;
28pub mod message;
29pub mod push_notification;
30pub mod push_notification_methods;
31pub mod send_message;
32pub mod streaming_events;
33pub mod task;
34pub mod task_lifecycle;
35pub mod version;
36pub mod well_known;
37
38#[cfg(test)]
39mod tests;
40
41pub use agent_card::{
42    AgentCapabilities, AgentCard, AgentCardBuilder, AgentCardError, AgentInterface, AgentSkill,
43    GRPC, HTTP_JSON, JSONRPC, ProtocolBinding,
44};
45pub use extended_agent_card::{GetExtendedAgentCardRequest, GetExtendedAgentCardResponse};
46pub use list_tasks::{ListTasksRequest, ListTasksResponse};
47pub use message::{DataPart, FileContent, FilePart, Message, MessageRole, Part, TextPart};
48pub use push_notification::{PushNotificationAuthenticationInfo, TaskPushNotificationConfig};
49pub use push_notification_methods::{
50    CreateTaskPushNotificationConfigRequest, CreateTaskPushNotificationConfigResponse,
51    DeleteTaskPushNotificationConfigRequest, DeleteTaskPushNotificationConfigResponse,
52    GetTaskPushNotificationConfigRequest, GetTaskPushNotificationConfigResponse,
53    ListTaskPushNotificationConfigsRequest, ListTaskPushNotificationConfigsResponse,
54};
55pub use send_message::{MessageSendConfiguration, SendMessageRequest, SendMessageResponse};
56pub use streaming_events::{StreamingEvent, TaskArtifactUpdateEvent, TaskStatusUpdateEvent};
57pub use task::{Artifact, Task, TaskState, TaskStatus};
58pub use task_lifecycle::{CancelTaskRequest, CancelTaskResponse, GetTaskRequest, GetTaskResponse};
59pub use version::{A2aVersion, ParseA2aVersionError};
60pub use well_known::{AGENT_CARD_WELL_KNOWN_PATH, is_agent_card_well_known_path};