[package]
name = "sage-persistence"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Persistence layer for Sage agent checkpoints"

[features]
default = ["sqlite"]
sqlite = ["rusqlite"]
postgres = ["sqlx"]
file = []

[dependencies]
tokio = { version = "1", features = ["fs", "sync", "macros", "rt-multi-thread"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
thiserror = "2"
async-trait = "0.1"
rusqlite = { version = "0.32", features = ["bundled"], optional = true }
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres"], optional = true }

[dev-dependencies]
tempfile = "3"
tokio-test = "0.4"

[lints]
workspace = true
