"""Durable identity/revision foundation for private Activity persistence."""

from .contracts import (
    ACTIVITY_SNAPSHOT_FORMAT,
    RAW_PAYLOAD_COMPRESSION_GZIP,
    RAW_PAYLOAD_ENCODING_JSON,
    ActivityEntity,
    ActivityEntityId,
    ActivityRevision,
    ActivityRevisionId,
    ActivityRevisionProvenance,
    ActivitySourceLink,
    ActivitySourceLinkId,
    RawPayloadBlob,
    activity_revision_id_for,
    activity_source_link_id_for,
    canonical_raw_payload_bytes,
    deserialize_activity_snapshot,
    new_activity_entity_id,
    new_activity_revision,
    new_activity_source_link,
    new_raw_provider_record,
    raw_payload_sha256,
    raw_provider_record_id_for,
    serialize_activity_snapshot,
)
from .ingestion import (
    PersistentActivityIngestionService,
    PersistentIngestionRequest,
    PersistentIngestionResult,
)
from .repository import SqliteActivityIdentityStore
from .sqlite import ActivitySqliteDatabase, MigrationChecksumMismatchError
from .sync import (
    OpaqueProviderState,
    ProviderSyncCheckpoint,
    ProviderSyncRun,
    ProviderSyncSource,
    SyncFrontierPolicy,
    SyncFrontierScope,
    SyncMode,
    SyncRunSourceObservation,
    SyncRunStatus,
)
from .sync_coordinator import (
    AcquiredProviderPage,
    DurableSyncCoordinator,
    ProviderAuthError,
    ProviderPageAdapter,
    ProviderPageError,
    ProviderRateLimitError,
    ProviderRetryableError,
)

__all__ = [
    "ACTIVITY_SNAPSHOT_FORMAT", "ActivityEntity", "ActivityEntityId", "ActivityRevision",
    "ActivityRevisionId", "ActivityRevisionProvenance", "ActivitySourceLink", "ActivitySourceLinkId",
    "ActivitySqliteDatabase", "MigrationChecksumMismatchError", "RAW_PAYLOAD_COMPRESSION_GZIP",
    "RAW_PAYLOAD_ENCODING_JSON", "RawPayloadBlob", "SqliteActivityIdentityStore",
    "PersistentActivityIngestionService", "PersistentIngestionRequest", "PersistentIngestionResult",
    "activity_revision_id_for", "activity_source_link_id_for", "canonical_raw_payload_bytes",
    "deserialize_activity_snapshot", "new_activity_entity_id", "new_activity_revision",
    "new_activity_source_link", "new_raw_provider_record", "raw_payload_sha256",
    "raw_provider_record_id_for", "serialize_activity_snapshot",
    "OpaqueProviderState", "ProviderSyncCheckpoint", "ProviderSyncRun", "ProviderSyncSource",
    "SyncFrontierPolicy", "SyncFrontierScope", "SyncMode", "SyncRunSourceObservation", "SyncRunStatus",
    "AcquiredProviderPage", "DurableSyncCoordinator", "ProviderAuthError", "ProviderPageAdapter",
    "ProviderPageError", "ProviderRateLimitError", "ProviderRetryableError",
]
