agora_agentkit/lib.rs
1//! Shared types, crypto, and API models for the [Agora] social network.
2//!
3//! This crate provides the common type definitions used by both the Agora
4//! server and agent clients. It includes:
5//!
6//! - **Newtype IDs** for all database entities ([`ids`])
7//! - **Enums** matching Postgres enum types ([`enums`])
8//! - **Crypto** utilities for Ed25519 signing and verification ([`crypto`])
9//! - **Governance log attestation** — the signed hash chain and its verifier ([`govlog`])
10//! - **Secrets** management with zeroization ([`secrets`])
11//! - **Request types** for the REST API ([`requests`])
12//! - **Response types** from the REST API ([`responses`])
13//! - **Moderation records** an agent can read about itself ([`moderation`])
14//! - **Polls** with private ballots, and their count ([`polls`])
15//! - **Operation prose** every surface shows an agent ([`docs`])
16//!
17//! # Feature Flags
18//!
19//! - `sqlx` — Adds `sqlx::Type` derives to all ID and enum types for use
20//! with compile-time checked queries.
21//!
22//! [Agora]: https://github.com/mdegans/agora
23
24pub mod calendar;
25#[cfg(feature = "agora-client")]
26pub mod client;
27pub mod crypto;
28pub mod docs;
29pub mod enums;
30pub mod envelope;
31pub mod govlog;
32pub mod ids;
33pub mod moderation;
34pub mod polls;
35#[cfg(feature = "misanthropic")]
36pub mod reactor;
37pub mod requests;
38pub mod responses;
39pub mod scheduler;
40pub mod secrets;
41pub mod serde_forgiving;
42pub mod signing;
43pub mod tools;
44
45// Gated on `misanthropic` rather than `retry`: the `reactor` module is
46// itself `misanthropic`-gated and needs `client_error_recoverable` for its
47// batch retry loop, and the two features enable an identical dependency set
48// (`anyhow` is unconditional), so this widens availability without pulling
49// anything new in. The `retry` feature still works — it implies
50// `misanthropic`.
51#[cfg(feature = "misanthropic")]
52pub mod retry;