Files
libchat/core/conversations/src/lib.rs
T
osmaczko 147d0b3b88 feat: surface what a GroupV2 conversation reports about itself
de-mls narrates its own commit-and-recovery cycle, and libchat consumes three of the fourteen events it emits and drops the rest. A group that has stopped moving therefore looks like one that is idle: the roster keeps reporting whatever it last committed, and the account of why sits in a log the application cannot reach.

Buffer the phase changes, the commit-round counts and the steps that did not go through the way causal-history observations are buffered, drain them after each drive of the core, and give each a client event. The count is the load-bearing one: a round that ends short of the candidates it expected is a round where members chose from different sets, which is how a group splits.
2026-08-24 10:23:11 +02:00

38 lines
1.4 KiB
Rust

mod causal_history;
mod conversation;
mod core;
mod errors;
mod group_v2_status;
mod inbox_v2;
mod outcomes;
mod proto;
mod service_context;
mod service_traits;
mod types;
mod utils;
pub use causal_history::{DeliveryAck, Frontier, MissingMessage};
pub use chat_sqlite::ChatStorage;
pub use chat_sqlite::StorageConfig;
pub use conversation::{GroupV2Clock, MessageId};
pub use core::{ConversationId, Core};
/// Timing/policy for GroupV2 conversations (de-mls's per-conversation config).
/// Defaults to the de-mls library defaults; inject via
/// [`Core::set_group_v2_config`]. The creator's phase durations (commit
/// inactivity, freeze, recovery, voting inactivity, proposal expiration,
/// consensus timeout) travel to joiners with the welcome and overwrite
/// theirs; vote delays and the policy fields stay local to each member.
pub use de_mls::ConversationConfig as GroupV2Config;
pub use de_mls::MockClock;
pub use errors::ChatError;
pub use group_v2_status::{GroupV2Phase, GroupV2Status, GroupV2StatusKind};
pub use outcomes::{
Content, ConversationClass, ConvoOutcome, InboxOutcome, NewConversation, PayloadOutcome,
};
pub use service_context::ExternalServices;
pub use service_traits::{DeliveryService, RegistrationService, WakeupService};
pub use shared_traits::{IdentId, IdentIdRef, IdentityProvider};
pub use storage::{ChatStore, ConversationKind};
pub use types::{AddressedEnvelope, ConvoMetadata};
pub use utils::{hex_trunc, trunc};