1pub mod attachment_sync;
16mod body_doc;
17mod body_doc_manager;
18pub mod control_message;
19mod history;
20pub mod materialize;
21mod memory_storage;
22pub mod sanity;
23pub mod self_healing;
24pub mod share_session;
25mod sync_handler;
26mod sync_manager;
27mod sync_protocol;
28mod sync_session;
29mod sync_types;
30mod time;
31mod workspace_doc;
32
33mod crdt_storage;
35
36mod crdt_fs;
38mod decorator_stack;
39
40mod sync_plugin;
42
43#[cfg(all(not(target_arch = "wasm32"), feature = "sqlite"))]
47mod sqlite_storage;
48
49#[cfg(all(not(target_arch = "wasm32"), feature = "git"))]
50pub mod git;
51
52#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
54mod sync_client;
55#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
56mod tokio_transport;
57#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
58mod transport;
59
60#[cfg(feature = "protocol")]
62pub mod protocol_types;
63
64#[cfg(feature = "doc-server")]
66mod doc_manager;
67#[cfg(feature = "doc-server")]
68pub use doc_manager::SyncDocManager;
69
70#[cfg(feature = "server")]
72pub mod hooks;
73#[cfg(feature = "server")]
74pub mod local;
75#[cfg(feature = "server")]
76pub mod protocol;
77#[cfg(feature = "server")]
78pub mod server;
79#[cfg(feature = "server")]
80pub mod storage;
81
82pub use crdt_storage::{CrdtStorage, CrdtUpdate, StorageResult, UpdateOrigin};
86pub use diaryx_core::types::{BinaryRef, FileMetadata};
87
88pub use body_doc::BodyDoc;
90pub use body_doc_manager::BodyDocManager;
91
92pub use workspace_doc::WorkspaceCrdt;
94
95pub use memory_storage::MemoryStorage;
98#[cfg(all(not(target_arch = "wasm32"), feature = "sqlite"))]
99pub use sqlite_storage::SqliteStorage;
100
101pub use sync_protocol::{
103 BodySyncProtocol, DocIdKind, SyncMessage, SyncProtocol, format_body_doc_id,
104 format_workspace_doc_id, frame_body_message, frame_message_v2, parse_doc_id,
105 unframe_body_message, unframe_message_v2,
106};
107
108pub use sync_handler::{GuestConfig, SyncHandler};
110pub use sync_manager::{BodySyncResult, RustSyncManager, SyncMessageResult};
111
112pub use history::{ChangeType, FileDiff, HistoryEntry, HistoryManager};
114pub use materialize::{
115 MaterializationResult, MaterializedFile, materialize_workspace, parse_snapshot_markdown,
116};
117pub use sanity::{IssueKind, SanityIssue, SanityReport, validate_workspace};
118pub use self_healing::{HealingAction, HealthTracker};
119
120pub use attachment_sync::AttachmentSyncClient;
122pub use control_message::ControlMessage;
123pub use share_session::{
124 HttpClient, HttpResponse, SessionCreatedResponse, SessionInfoResponse, ShareSessionClient,
125};
126pub use sync_session::{IncomingEvent, SessionAction, SyncSession};
127pub use sync_types::{SyncEvent, SyncSessionConfig, SyncStatus};
128
129pub use crdt_fs::CrdtFs;
131pub use decorator_stack::{DecoratedFs, DecoratedFsBuilder, EventOnlyFs};
132
133pub use sync_plugin::SyncPlugin;
135
136#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
138pub use sync_client::{ReconnectConfig, SyncClient, SyncClientConfig, SyncEventHandler, SyncStats};
139#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
140pub use tokio_transport::{TokioConnector, TokioTransport};
141#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
142pub use transport::{SyncTransport, TransportConnector, TransportError, WsMessage};