Skip to main content

Crate lash_sqlite_store

Crate lash_sqlite_store 

Source
Expand description

§lash-sqlite-store

The high-performance local durable persistence backend for the lash agent runtime. One SQLite database per session, opened in WAL journal mode with a 15-second busy timeout, satisfying the full RuntimePersistence + AttachmentManifest contract from lash-core.

This crate is a drop-in replacement for lash-sqlite-store: it exposes the same public surface (Store, SqliteProcessRegistry, SqliteSessionStoreFactory, SqliteEffectHost, the option/descriptor types) with identical async signatures, so a consumer swaps backends by renaming the crate path only. The difference is the engine underneath: tokio-rusqlite over a statically-linked SQLite with real WAL (-wal/-shm sidecars, multi-process readers + single writer) instead of the prior store’s experimental mvcc.

§Why this is “the durable backend” not just “an option”

Lash’s runtime layer treats persistence as a first-class boundary, not a debug-only convenience. Every primitive that lets the runtime survive a crash — head-revision CAS, final turn-commit idempotency, attachment write-ahead manifests, blob content-addressing with optional compression — is implemented in this crate against SQLite for one reason: SQLite is the simplest backend that gives us atomic multi-statement transactions on a single file with durability guarantees we can reason about.

§Schema cutover, not migrations

There is exactly one supported schema (see [schema::SCHEMA]). Older databases must be deleted before opening — we do not carry migration code.

Structs§

BlobArtifactDescriptor
SqliteEffectHost
Deployment-level SQLite effect host.
SqliteEffectReplayOptions
Options for SQLite-backed runtime effect replay.
SqliteHostEventStore
SqliteProcessRegistry
SQLite-backed process registry for one configured runtime deployment.
SqliteRuntimeEffectController
Scoped SQLite-backed runtime effect controller.
SqliteSessionStoreFactory
Explicit first-party factory for one SQLite session database per Lash session.
Store
SQLite-backed store for checkpoint blobs and the canonical session head.
StoreGcPolicy
StoreOptions
StoredSessionCheckpoint

Enums§

BlobStorageHint
BuiltinBlobProfile
PersistedArtifactKind