Sync / API
foldkit-durable/core
foldkit-durable/core: the journal over any effect/sql SQLite client,
without Node's driver, for a browser (@effect/sql-sqlite-wasm), D1
(@effect/sql-d1, with d1: true), or any other runtime.
Journal.layer(options) is the journal as a layer that
needs the SqlClient; the package's main entry adds Journal.make over a
node:sqlite file.
Namespaces
Codec | Encodes a value to JSON-compatible data and decodes it back strictly. |
Journal | A durable journal; see journal.ts. Declared here beside the Journal namespace, since a type and a const of one name must come from one module. |
journalMetrics | Counters an application can scrape; the default registry already collects them. |
Functions
Values
ActorId | The trusted actor a principal commits as. |
Cursor | A read position in a document; 0 is the start. |
DocumentId | A journal's partition key: one authoritative document per key. |
OpId | The stable identity of one operation within its document. |
Sequence | A committed operation's position in a document; 1-based and gap-free. |
Classes
Interfaces
AuthorizationRequest | The application's policy decision for an operation, against the authoritative snapshot. |
Committed | An operation as the journal committed it, with its authoritative order and actor. |
EffectRecord | The durable record of one externally visible effect. |
JournalDefinition | One journal's service tag together with the layer that satisfies it, both built from the same type parameters, so the tag cannot be read back as a journal… |
RecoveryIntent | One effect a committed operation requires. key must be stable across restarts. |
RecoveryOptions | |
ValidationRequest | Structural checks that run before a commit and throw when the operation is invalid. |
Types
AppendError | |
AppendResult | The outcome of append. AlreadyCommitted means the operation is known but its payload was compacted away, so no Committed operation can be returned; a caller… |
AuthorizationDecision | What authorize answers. true allows and false refuses; the object form refuses with the rule's own reason, which reaches the caller on… |
CodecInput | What JournalOptions.operation and .snapshot accept: an Effect Schema.Codec, or the function pair for an application that does not use Schema. A schema that… |
EffectStatus | |
JournalStoreOptions | JournalOptions without the file: the store is the SqlClient the core Journal.layer is given. |