JIXU DOCUMENTATION
jixu-store-sqlite
A transactional local SQLite Store for Events, Artifacts, and Checkpoints.
jixu-store-sqlite implements the EventStore port with Node.js built-in SQLite. It is the first-party default when a local Agent needs one durable database file and transactional writes.
Install
npm install jixu-core jixu-store-sqliteCreate the Store
import { SqliteEventStore } from "jixu-store-sqlite";
const store = new SqliteEventStore("./data/jixu.db");
try {
// Pass store to createHarness({ store, ... }).
} finally {
store.close();
}The constructor creates missing parent directories, enables WAL mode and foreign keys, and initializes the Thread, Event, Artifact, and Checkpoint tables.
Store behavior
- Thread creation, Fork creation, and Event appends are transactional;
- appends use optimistic revision checks;
- Event IDs remain unique across Threads;
- persisted Events and Checkpoints are decoded fail-closed;
- Artifact bytes are verified against digest and byte length; and
- closing the Store explicitly releases the database handle.
Events remain the sole authority for a Thread. A Checkpoint is only a disposable projection cache and can always be rebuilt from Events.
Runtime and deployment boundary
This adapter uses node:sqlite and requires Node.js 22.19.0 or newer. It is a local Store, not a distributed database or a claim of multi-host coordination.
Compare jixu-store-jsonl when direct inspection with ordinary files is more important than a single transactional database.