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 = "server")]
62pub mod hooks;
63#[cfg(feature = "server")]
64pub mod local;
65#[cfg(feature = "server")]
66pub mod protocol;
67#[cfg(feature = "server")]
68pub mod server;
69#[cfg(feature = "server")]
70pub mod storage;
71
72pub use crdt_storage::{CrdtStorage, CrdtUpdate, StorageResult, UpdateOrigin};
76pub use diaryx_core::types::{BinaryRef, FileMetadata};
77
78pub use body_doc::BodyDoc;
80pub use body_doc_manager::BodyDocManager;
81
82pub use workspace_doc::WorkspaceCrdt;
84
85pub use memory_storage::MemoryStorage;
88#[cfg(all(not(target_arch = "wasm32"), feature = "sqlite"))]
89pub use sqlite_storage::SqliteStorage;
90
91pub use sync_protocol::{
93 BodySyncProtocol, DocIdKind, SyncMessage, SyncProtocol, format_body_doc_id,
94 format_workspace_doc_id, frame_body_message, frame_message_v2, parse_doc_id,
95 unframe_body_message, unframe_message_v2,
96};
97
98pub use sync_handler::{GuestConfig, SyncHandler};
100pub use sync_manager::{BodySyncResult, RustSyncManager, SyncMessageResult};
101
102pub use history::{ChangeType, FileDiff, HistoryEntry, HistoryManager};
104pub use materialize::{
105 MaterializationResult, MaterializedFile, materialize_workspace, parse_snapshot_markdown,
106};
107pub use sanity::{IssueKind, SanityIssue, SanityReport, validate_workspace};
108pub use self_healing::{HealingAction, HealthTracker};
109
110pub use attachment_sync::AttachmentSyncClient;
112pub use control_message::ControlMessage;
113pub use share_session::{
114 HttpClient, HttpResponse, SessionCreatedResponse, SessionInfoResponse, ShareSessionClient,
115};
116pub use sync_session::{IncomingEvent, SessionAction, SyncSession};
117pub use sync_types::{SyncEvent, SyncSessionConfig, SyncStatus};
118
119pub use crdt_fs::CrdtFs;
121pub use decorator_stack::{DecoratedFs, DecoratedFsBuilder, EventOnlyFs};
122
123pub use sync_plugin::SyncPlugin;
125
126#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
128pub use sync_client::{ReconnectConfig, SyncClient, SyncClientConfig, SyncEventHandler, SyncStats};
129#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
130pub use tokio_transport::{TokioConnector, TokioTransport};
131#[cfg(all(not(target_arch = "wasm32"), feature = "native-sync"))]
132pub use transport::{SyncTransport, TransportConnector, TransportError, WsMessage};