Skip to main content

systemprompt_models/documents/
mod.rs

1//! Shared document store models.
2//!
3//! The format, projection and edit-op vocabulary is defined beside the
4//! codec seam in `systemprompt_provider_contracts::documents` and
5//! re-exported here, so every layer names one set of types. This module
6//! adds what only the store and its clients need: access levels, actions,
7//! grant audit events and access request states ([`access`]), the bridge
8//! drive sync protocol ([`drive`]), the AG-UI custom event payloads
9//! ([`events`], with the comment edit, delete and mention payloads in
10//! [`comment_events`]) and the `document://` URI ([`uri`]).
11//!
12//! Copyright (c) systemprompt.io — Business Source License 1.1.
13//! See <https://systemprompt.io> for licensing details.
14
15pub mod access;
16pub mod awareness;
17pub mod collab_events;
18pub mod comment_events;
19pub mod drive;
20pub mod events;
21pub mod sharing_events;
22pub mod uri;
23
24pub use access::{
25    AccessLevel, AccessRequestStatus, ActorKind, AgentEditPolicy, DocumentAction, EditMode,
26    GrantEventKind, ProposalStatus, RevisionOriginKind, UnknownDocumentValue,
27};
28pub use awareness::{
29    AwarenessCursor, AwarenessMode, AwarenessState, AwarenessViewport, DocumentAwarenessEvent,
30    DocumentLiveClosedEvent, DocumentLiveReadyEvent, DocumentLiveResyncEvent, LiveResyncReason,
31};
32pub use comment_events::{
33    DocumentCommentDeletedEvent, DocumentCommentMentionedEvent, DocumentCommentUpdatedEvent,
34    MENTION_EVENT_VERSION, MENTION_EXCERPT_CHARS,
35};
36pub use drive::{
37    BRIDGE_DEVICE_AUDIENCE, DRIVE_SYNC_AUDIENCE, DriveChange, DriveChangeKind, DriveChanges,
38    DriveCommitMeta, DriveCommitResponse, DriveEntry, DriveManifest, DriveProposal, DriveProposals,
39    DriveSyncToken, PresenceBeacon, PresenceSource, PresenceState,
40};
41pub use events::{
42    DocumentAccessRequestedEvent, DocumentCollabDegradedEvent, DocumentCollabUpdateEvent,
43    DocumentCommentCreatedEvent, DocumentCommentResolvedEvent, DocumentConflictEvent,
44    DocumentEventName, DocumentLockEvent, DocumentOwnershipTransferredEvent, DocumentPresenceEvent,
45    DocumentProposalEvent, DocumentRevisionCreatedEvent, DocumentSharedEvent, SHARED_EVENT_VERSION,
46};
47pub use systemprompt_provider_contracts::documents::{
48    CellValue, ContentAs, DocumentFormat, EditOp, NodeKind, NodeTarget, Projection, ProjectionNode,
49    QuoteTarget, UnknownDocumentFormat, content_hash, hash8,
50};
51pub use uri::{DocumentUri, DocumentUriError};