#![deny(missing_docs)]
#![deny(unsafe_op_in_unsafe_fn)]
#![warn(clippy::all, clippy::pedantic, clippy::nursery)]
#![allow(clippy::module_name_repetitions)]
#[macro_use]
mod trace;
pub mod agent_card;
pub mod builder;
pub mod call_context;
pub mod dispatch;
pub mod error;
pub mod executor;
pub mod executor_helpers;
pub mod handler;
pub mod interceptor;
pub mod metrics;
pub mod push;
pub mod rate_limit;
pub mod request_context;
pub mod serve;
pub mod store;
pub mod streaming;
pub mod tenant_config;
pub mod tenant_resolver;
#[cfg(feature = "otel")]
pub mod otel;
pub use agent_card::{
AgentCardProducer, DynamicAgentCardHandler, HotReloadAgentCardHandler, StaticAgentCardHandler,
CORS_ALLOW_ALL,
};
pub use builder::RequestHandlerBuilder;
pub use call_context::CallContext;
#[cfg(feature = "axum")]
pub use dispatch::axum_adapter::A2aRouter;
#[cfg(feature = "websocket")]
pub use dispatch::WebSocketDispatcher;
pub use dispatch::{CorsConfig, DispatchConfig, JsonRpcDispatcher, RestDispatcher};
#[cfg(feature = "grpc")]
pub use dispatch::{GrpcConfig, GrpcDispatcher};
pub use error::{ServerError, ServerResult};
pub use executor::AgentExecutor;
pub use executor_helpers::{boxed_future, EventEmitter};
pub use handler::{HandlerLimits, RequestHandler, SendMessageResult};
pub use interceptor::{ServerInterceptor, ServerInterceptorChain};
pub use metrics::{ConnectionPoolStats, Metrics};
#[cfg(feature = "otel")]
pub use otel::OtelMetrics;
pub use push::{
HttpPushSender, InMemoryPushConfigStore, PushConfigStore, PushRetryPolicy, PushSender,
TenantAwareInMemoryPushConfigStore,
};
pub use rate_limit::{RateLimitConfig, RateLimitInterceptor};
pub use request_context::RequestContext;
pub use serve::{serve, serve_with_addr, Dispatcher};
pub use store::{
InMemoryTaskStore, TaskStore, TaskStoreConfig, TenantAwareInMemoryTaskStore, TenantContext,
TenantStoreConfig,
};
#[cfg(feature = "sqlite")]
pub use push::{SqlitePushConfigStore, TenantAwareSqlitePushConfigStore};
#[cfg(feature = "sqlite")]
pub use store::{Migration, MigrationRunner, SqliteTaskStore, TenantAwareSqliteTaskStore};
#[cfg(feature = "postgres")]
pub use push::{PostgresPushConfigStore, TenantAwarePostgresPushConfigStore};
#[cfg(feature = "postgres")]
pub use store::{PgMigration, PgMigrationRunner, PostgresTaskStore, TenantAwarePostgresTaskStore};
pub use streaming::{
EventQueueManager, EventQueueReader, EventQueueWriter, InMemoryQueueReader, InMemoryQueueWriter,
};
pub use tenant_config::{PerTenantConfig, TenantLimits};
pub use tenant_resolver::{
BearerTokenTenantResolver, HeaderTenantResolver, PathSegmentTenantResolver, TenantResolver,
};