klieo-a2a 3.1.0

Durable A2A v1.0 protocol layer atop klieo-bus traits.
Documentation
#![deny(missing_docs)]
#![deny(rust_2018_idioms)]
#![deny(rustdoc::broken_intra_doc_links)]

//! Durable A2A v1.0 protocol layer for klieo agents.
//!
//! Implements the [Agent-to-Agent (A2A) v1.0 specification](https://a2a-protocol.org/latest/specification/)
//! wire types, JSON-RPC envelope, and a server-side dispatcher atop
//! [`klieo_core::Pubsub`] + [`klieo_core::KvStore`].
//!
//! # Why durable A2A?
//!
//! Today A2A runs over HTTP/JSON-RPC + WebSocket. Klieo's angle:
//! implement the same wire shape over **NATS JetStream + KV +
//! JobQueue**. Inter-agent calls inherit the durability, leasing,
//! dedup, and DLQ semantics of [`klieo_core::JobQueue`] — *A2A but
//! work-doesn't-get-stuck.*
//!
//! Wire-compatible at the JSON-RPC envelope level: a payload
//! produced by `adk-python` deserialises into our `SendMessageParams`
//! cleanly. Only the transport differs.
//!
//! # Architecture asymmetry
//!
//! [`server::A2aServer`] takes `Arc<dyn Pubsub>` (not
//! `Arc<dyn RequestReply>`) because `klieo-core`'s
//! [`klieo_core::RequestReply`] trait is *client-side only*. The
//! server listens on `<app_prefix>.a2a.<agent_id>.rpc` via
//! [`klieo_core::Pubsub::subscribe`] and replies by publishing on a
//! per-request reply subject extracted from message headers. A typed
//! server-side trait would tighten the API; deferred until a second
//! protocol-server consumer exists.

pub mod auth;
pub mod client;
#[cfg(feature = "conformance")]
pub mod conformance;
pub mod envelope;
pub mod error;
pub mod handler;
#[cfg(feature = "http")]
pub mod http;
pub mod server;
pub mod task_store;
pub mod types;

pub use auth::RequestContext;
pub use client::A2aClient;
#[cfg(feature = "conformance")]
pub use conformance::{run_conformance_suite, CaseStatus, ConformanceCase, ConformanceReport};
pub use envelope::{codes, A2aHeaders, A2aMethod, JsonRpcError, JsonRpcRequest, JsonRpcResponse};
pub use error::{A2aBuilderError, A2aError};
pub use handler::A2aHandler;
#[cfg(any(test, feature = "test-fixtures"))]
pub use handler::EchoHandler;
pub use server::{
    A2aDispatcher, A2aDispatcherBuilder, A2aServer, TaskEvent, TaskEventSink, TaskEventStream,
    LEADER_TTL,
};
pub use task_store::A2aTaskStore;
pub use types::{
    AgentCapabilities, AgentCard, AgentCardSignature, AgentInterface, AgentProvider, AgentSkill,
    Artifact, CancelTaskParams, DeletePushNotificationConfigParams, GetExtendedAgentCardParams,
    GetPushNotificationConfigParams, GetTaskParams, ListPushNotificationConfigsParams,
    ListPushNotificationConfigsResult, ListTasksParams, ListTasksResult, Message, Part,
    PushNotificationConfig, PushNotificationConfigParams, Role, SendMessageParams,
    SendMessageResult, SubscribeToTaskParams, Task, TaskStatus,
};