Skip to main content

Crate systemprompt_sync

Crate systemprompt_sync 

Source
Expand description

Cloud sync orchestration for systemprompt.io.

Drives push/pull of files, agents, skills, content, and database state between a local systemprompt project and the systemprompt cloud (or a self-hosted tenant in direct-sync mode).

§Public surface

§Feature flags

This crate has no Cargo features.

All public items are doc-commented; module-level //! docs explain responsibility boundaries.

Re-exports§

pub use api_client::SyncApiClient;
pub use database::ContextExport;
pub use database::DatabaseExport;
pub use database::DatabaseSyncService;
pub use database::SkillExport;
pub use diff::AgentsDiffCalculator;
pub use diff::ContentDiffCalculator;
pub use diff::SkillsDiffCalculator;
pub use diff::compute_content_hash;
pub use error::SyncError;
pub use error::SyncResult;
pub use export::escape_yaml;
pub use export::export_agent_to_disk;
pub use export::export_content_to_file;
pub use export::export_skill_to_disk;
pub use export::generate_agent_config;
pub use export::generate_agent_system_prompt;
pub use export::generate_content_markdown;
pub use export::generate_skill_config;
pub use export::generate_skill_markdown;
pub use files::FileBundle;
pub use files::FileDiffStatus;
pub use files::FileEntry;
pub use files::FileManifest;
pub use files::FileSyncService;
pub use files::PullDownload;
pub use files::SyncDiffEntry;
pub use files::SyncDiffResult;
pub use jobs::ContentSyncJob;
pub use local::AgentsLocalSync;
pub use local::ContentDiffEntry;
pub use local::ContentLocalSync;
pub use local::SkillsLocalSync;
pub use models::AgentDiffItem;
pub use models::AgentsDiffResult;
pub use models::ContentDiffItem;
pub use models::ContentDiffResult;
pub use models::DiffStatus;
pub use models::DiskAgent;
pub use models::DiskContent;
pub use models::DiskSkill;
pub use models::LocalSyncDirection;
pub use models::LocalSyncResult;
pub use models::SkillDiffItem;
pub use models::SkillsDiffResult;

Modules§

api_client
HTTP client used by sync push/pull/deploy.
crate_deploy
End-to-end “build crate, push docker image, deploy” flow used by systemprompt cloud deploy for the rust-side container image.
database
Database push / pull: serialise the user, skill, and context tables to JSON and round-trip them between a local Postgres and a cloud Postgres using compile-time-checked sqlx upserts.
diff
Pure-function diff calculators for agents, skills, and content.
error
Error types for the systemprompt-sync crate.
export
Disk serialisation helpers used by the various *_to_disk operations. Each submodule emits the YAML config + Markdown body layout expected by the matching *Local Sync.
files
High-level push / pull / diff for the on-disk services/ directory: bundles eligible files into a tarball, talks to the cloud, and reports a per-file diff.
jobs
Scheduled jobs registered with the systemprompt scheduler.
local
Disk ↔ database sync drivers per content kind.
models
Plain-data structs describing local-sync diffs and on-disk representations of agents / skills / content.

Structs§

SyncConfig
SyncConfigBuilder
SyncOperationResult
SyncService

Enums§

SyncDirection
SyncOpState