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
SyncService,SyncConfig,SyncConfigBuilder— high-level façade that wires everything together forcloud synccommands.SyncApiClient— low-level HTTP client for the cloud API.AgentsLocalSync,SkillsLocalSync,ContentLocalSync— disk ↔ database sync for each domain.AgentsDiffCalculator,SkillsDiffCalculator,ContentDiffCalculator— pure diff computation.SyncError/SyncResult— typed error returned by every public function in this crate.
§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 deployfor 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
sqlxupserts. - 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_diskoperations. 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.