Skip to main content

de_mls/app/user/plugins/
bundle.rs

1//! [`UserPlugins`] — bundle of all User-level plugin state on one struct
2//! so the `User` definition surfaces registry + identity + transport at
3//! top level and groups plugin concerns here.
4
5use crate::{
6    app::ConsensusContext,
7    core::{
8        ConsensusPlugin, ConversationConfig, ConversationPluginsFactory, ScoringConfig,
9        StewardListConfig,
10    },
11};
12
13/// Bundle of all User-level plugin state. One factory plus its three
14/// seed configs, owned outright.
15pub struct UserPlugins<P: ConsensusPlugin, CP: ConversationPluginsFactory> {
16    /// Builds per-conversation plug-in instances (MLS service, scoring,
17    /// steward list) and mints identity-bound key packages for joiners.
18    pub conversation_plugins: CP,
19    /// Consensus-plugin state. Owns the shared storage handle + signer
20    /// and mints per-conv services on demand.
21    pub consensus: ConsensusContext<P>,
22    /// Seed config copied into newly-created `SessionRunner`s.
23    pub default_conversation_config: ConversationConfig,
24    /// Seed config for the per-conversation peer-scoring plug-in.
25    pub default_scoring_config: ScoringConfig,
26    /// Seed config for the per-conversation steward-list plug-in.
27    pub default_steward_list_config: StewardListConfig,
28}