mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
feat(durable): replicate storages as a commit log
Every built-in storage implements ReplayableStorage: head(), replay() at an explicit sequence, and export() of the current state as a log that replays to the same reads. SQLite schema version 3 adds sequence indexes so export streams. @earendil-works/pi-durable/sync adds ReplicatingStorage, which appends each committed batch to an outbox with fork copies resolved, compactRecords(), and versioned JSON log lines.
This commit is contained in:
parent
89e309581b
commit
4c25119f54
24 changed files with 1586 additions and 33 deletions
|
|
@ -64,8 +64,9 @@ const BUDGETS = {
|
|||
// memory and SQLite storages share scan order and cursor handling. Values from Chord's root (copyJson,
|
||||
// replicatedState) reach its host runtime through the root barrel. Chord's context reaches pi-telemetry's root
|
||||
// (index, noop, metrics, memory) for its NOOP telemetry default; harness/telemetry.ts is Durable's schema.
|
||||
// The Harness's request identity reaches pi-ai's utils/identity.ts and its version constant.
|
||||
maxFiles: 73,
|
||||
// The Harness's request identity reaches pi-ai's utils/identity.ts and its version constant. The storages
|
||||
// share log export (storage/export.ts).
|
||||
maxFiles: 74,
|
||||
forbid: [
|
||||
"packages/ai/src/index.ts",
|
||||
"packages/ai/src/utils/typebox-helpers.ts",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue