1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! I/O contract between the protocol layer and an integrator.
//!
//! Two channels:
//!
//! - [`SessionEvent`] — fire-and-forget notifications about a single
//! conversation. Each [`crate::app::SessionRunner`] owns a broadcast sender;
//! integrators subscribe per session.
//! - [`ConversationLifecycle`] — User-level create/remove notifications.
//! Integrators use this to discover new sessions and subscribe to them.
//!
//! Synchronous outbound transport is supplied by
//! [`crate::ds::DeliveryService`], passed to `User` at construction and
//! cloned into each session.
use ConsensusEvent;
use crate::;
/// Per-conversation notification. Sessions append these to their pending
/// buffer; integrators drain via
/// [`crate::app::SessionRunner::drain_events`] once per polling cycle. All
/// variants are fire-and-forget — no failure path back to the session.
/// User-level conversation lifecycle event. Appended to [`crate::app::User`]'s
/// pending buffer; integrators drain via
/// [`crate::app::User::drain_lifecycle_events`] once per polling cycle and
/// use `Created` as the trigger to begin draining per-session
/// [`SessionEvent`]s.