| Crates.io | spec-ai-graph-sync |
| lib.rs | spec-ai-graph-sync |
| version | 0.6.0-prerelease.12 |
| created_at | 2025-12-01 15:47:48.494023+00 |
| updated_at | 2026-01-04 05:02:30.817657+00 |
| description | Knowledge graph synchronization engine for spec-ai |
| homepage | |
| repository | https://github.com/geoffsee/spec-ai |
| max_upload_size | |
| id | 1959972 |
| size | 110,333 |
Knowledge graph synchronization engine for spec-ai.
This crate provides a distributed synchronization engine for knowledge graphs using vector clocks for causal ordering and conflict detection.
spec-ai-graph-sync
├── engine.rs # Main sync engine implementation
├── persistence.rs # Storage backend trait
├── protocol.rs # Sync protocol messages and payloads
├── resolver.rs # Conflict resolution strategies
└── types.rs # Sync-specific data types
Implement the SyncPersistence trait for your storage backend, then create a SyncEngine instance:
use spec_ai_graph_sync::{SyncEngine, SyncPersistence};
// Implement SyncPersistence for your storage
struct MyStorage { /* ... */ }
impl SyncPersistence for MyStorage { /* ... */ }
// Create the sync engine
let storage = MyStorage::new();
let engine = SyncEngine::new(storage, "instance-1".to_string());
// Perform sync operations
let payload = engine.sync_full("session-1", "default").await?;
SyncEngine - Main synchronization engineSyncPersistence - Trait for storage backendsGraphSyncPayload - Full sync data payloadConflictResolver - Conflict resolution interfaceVectorClock - Causal ordering primitive (re-exported from knowledge-graph)spec-ai-knowledge-graph - Graph types and vector clock implementationuuid - Unique identifiers for sync sessionschrono - Timestamps for change trackingThis is an internal crate primarily used by:
spec-ai-core - For distributed knowledge graph synchronizationFor end-user documentation, see the main spec-ai README.