a2a/lib.rs
1//! # a2a
2//!
3//! A2A (agent-to-agent) schema types for the substrate mailbox and tasklist.
4//!
5//! This crate is schema-only: no engine adapters, no transport, no IO.
6//! Types map to the A2A protocol shape but are transport-agnostic.
7//!
8//! # Task lifecycle
9//!
10//! `Submitted -> Working -> InputRequired -> Working -> Completed` with
11//! `Failed` and `Cancelled` reachable from any non-terminal state.
12//! Use [`TaskState::can_transition`] to validate moves.
13//!
14//! # Message lifecycle
15//!
16//! `Unread -> Delivered -> Consumed`. Atomic claim semantics are enforced
17//! by the store layer (e.g. `store-sqlite` via `UPDATE WHERE state='unread'`).
18#![forbid(unsafe_code)]
19#![warn(missing_docs)]
20
21pub mod error;
22/// Message, Part, MsgState, MessageKind, and Artifact types.
23pub mod message;
24/// Task and TaskState types.
25pub mod task;
26
27pub use error::{A2aError, A2aResult};
28pub use message::{Artifact, Message, MessageKind, MsgState, Part};
29pub use task::{Task, TaskState};