1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! SQLite-per-session, event-sourced state server for AI agents.
//!
//! `cellz` is a language-agnostic state and stream plane. Each session is a
//! single-writer SQLite cell with event sourcing, message projection, KV state,
//! and checkpoints. Enable `server` (default) for lossless SSE / WebSocket
//! replay over HTTP. Enable `s3` for durable leases and snapshots on S3 /
//! Cloudflare R2; the default blob backend is the local filesystem.
//!
//! # Install the daemon
//!
//! ```text
//! cargo install cellz
//! cellz
//! ```
//!
//! S3 / R2 support: `cargo install cellz --features s3`.
//!
//! # Embed as a library
//!
//! In-process core — no HTTP stack, no object_store:
//!
//! ```no_run
//! use std::sync::Arc;
//!
//! use cellz::cell::CellManager;
//! use cellz::config::Config;
//! use cellz::storage::LocalBlobStore;
//!
//! # #[tokio::main]
//! # async fn main() -> anyhow::Result<()> {
//! let config = Config::default();
//! let storage = Arc::new(LocalBlobStore::new(&config.storage_dir));
//! let manager = CellManager::new(
//! &config.data_dir,
//! storage,
//! config.lease_ttl_secs,
//! );
//! let _handle = manager
//! .create_cell(Some("agent-1".into()), Some("demo".into()), None)
//! .await?;
//! # Ok(())
//! # }
//! ```
//!
//! ```toml
//! # gitcell / in-process embed
//! cellz = { version = "0.2", default-features = false }
//!
//! # HTTP daemon API (default)
//! cellz = "0.2"
//!
//! # + S3 / R2 snapshots
//! cellz = { version = "0.2", features = ["s3"] }
//! ```
pub use Config;
pub use ;
pub use create_router;