Skip to main content

diavlos_core/
lib.rs

1//! Diavlos core: keys, signed messages, invites, rooms, and the inbox.
2//!
3//! This crate has no network code and no async runtime. It is the part
4//! every door (MCP, CLI, library) shares, and the part that is easiest to
5//! audit. The helper daemon in the `diavlos` crate puts a network and a
6//! local socket around it.
7//!
8//! Delivery promise, in writing: at-least-once, dedup by id, on disk before
9//! `send` returns.
10
11pub mod bundle;
12pub mod canonical;
13pub mod control;
14pub mod error;
15pub mod faults;
16pub mod files;
17pub mod invite;
18pub mod keys;
19pub mod limits;
20pub mod message;
21pub mod names;
22pub mod policy;
23pub mod room;
24pub mod secrets;
25pub mod store;
26
27pub use control::ControlOp;
28pub use error::{Error, Fate, Result};
29pub use invite::{Invite, InviteSpec};
30pub use keys::{Identity, Kind, Profile, PublicKey, SignedProfile, Signer};
31pub use limits::Limits;
32pub use message::{Action, AgentInfo, DataClass, Draft, Message, MessageType};
33pub use policy::{DefaultHook, FileMode, Policy, PolicyHook};
34pub use room::{Member, Role, Room};
35pub use store::{
36    Delivery, DeliveryState, FileRefRow, LocalMember, OutboxCounts, OutboxEntry, OutboxState,
37    Settle, SpendOutcome, SpendRecord, SpendRequest, Store, StoredFile, WakePending,
38};
39
40/// Version of this crate, for the version handshake.
41pub const VERSION: &str = env!("CARGO_PKG_VERSION");
42
43/// Wire protocol version between helpers. Bump on incompatible change.
44pub const PROTOCOL_VERSION: u32 = 1;