v0.5.02026-10-15
Changed
- SQLite schema tables: Fixed Date fields in State.SQLite.table({ schema })
so their codecs round-trip through SQLite in structs and Schema.Class rows
while preserving Date checks and transformations, including nullable encoded
Dates. Thanks @acusti for the original fix
(#1596,
#1597,
#1672).
- Effect dependencies: Updated the aligned Effect 4 dependency cohort from
4.0.0 to 4.0.3, including its AI, OpenTelemetry, platform, SQLite, and
Vitest packages. Applications using Effect should align their dependencies
to 4.0.3 or a compatible later 4.x release
(#1669).
- Contributor meetings: Added the canonical docs schedule for the next two
fortnightly meetings at 19:00 Berlin, automatic Google Calendar publishing,
and a stable Riverside room link
(#1635).
- Store commits: Fixed the callback form of store.commit and its TypeScript
overloads, including calls with commit options. Synchronous callbacks return
an event array that is collected before materialization, and throwing callbacks
apply no events (#1611,
#1616).
Thanks @bohdanbirdie for the original fix.
- Cloudflare sync telemetry: Added optional Effect tracer layers via otel: layer.
Telemetry cleanup runs in the background, and finite WebSocket operations and
DO-RPC pull streams now emit their sync spans
(#1618).
- Cloudflare adapter: Track state database ownership and remove obsolete
tracked state after successful boot, preserving the current state, eventlog
and untracked files. Failed cleanup is retried on a later boot without
blocking the completed store
(#1555).
- Schema rebuilds: Batched eventlog replay to reduce repeated SQLite page
writes, including billed row writes on Cloudflare Durable Objects. Replay order
and recovery from incomplete rebuilds are preserved. Clients can tune the
event-count batch per runtime with params.stateRebuildBatchSize (a positive
integer, default 100); lower values trade more queries and writes for smaller batches
(#1555).
- State recovery: Interrupted rematerialization is retried from clean derived
state instead of reopening partial results. Completion is recorded after all
migration hooks finish. Browser fast-path startup waits for recovery when its
snapshot is incomplete. The eventlog and pending events are preserved
(#1605).
- Cloudflare sync: Serialize push admission through pull publication so an
accepted event cannot advance the backend head without notifying subscribers
(#1537).
- Cloudflare WebSocket sync: Live pulls interrupted after the sync Durable
Object hibernates now receive their terminal RPC Exit, matching interruption
behavior before hibernation. Completed and protocol-defected pulls are also
removed from persisted fan-out state
(#1418).
- Cloudflare sync: Fixed live WebSocket pulls stopping permanently after a
disconnect. Pulls now resume after reconnect without reloading the client,
and HTTP transport failures also remain retryable. Offline pulls wait for
reconnection rather than spinning, and resume as soon as the backend reports
connected. Capped fallback probes cover stale connectivity signals and still
wake immediately on later disconnect/reconnect transitions.
Protocol failures stay terminal
(#1650,
#1673).
For the root-cause analysis, thanks @bohdanbirdie.
- Cloudflare DO-RPC sync: A temporary Durable Object RPC failure no longer
stops replication for good. A call that Cloudflare marks retryable (and not
overloaded) now surfaces as IsOfflineError, so the leader retries the pull
after a jittered exponential backoff (1 s doubling to 30 s) on a fresh stub.
Interrupted catch-up streams also recover when Cloudflare drops the error
flags or the stream stalls for 60 seconds, resuming after the last applied
event. Idle live subscriptions do not time out. Explicit overload and
non-retryable remote failures keep their previous terminal handling
(#1462,
#1649).
- Removed redundant devenv package entries now owned by the task guard modules.
- Sync correctness: Prevented later client-session events from crossing an
older rejected pending prefix, and made leader admission retain explicit
reservation ownership through queue drain until apply, rejection, or stale
dropping. Parent contiguity now compares DAG position independently of local
rebase generation while stale epochs remain checked separately, avoiding
duplicate materialization and ghost fences during multi-writer rebases
(#1530).
- Expo getting-started docs: The manual install command now installs
@livestore/sync-cf instead of the import subpath @livestore/sync-cf/client,
which package managers resolved as a git URL and failed to install
(#1657,
#1667).
- Session IDs: Resolved symbol-backed session IDs at store, query and sync
boundaries so queries receive stable session ID values. Thanks @IGassmann
(#1297).
- Cloudflare DO-RPC sync: Restored sync after the Effect 4 migration and
isolated binary parsers per request so concurrent stream and unary responses
cannot corrupt each other's frames. Thanks @IGassmann and @bohdanbirdie
(#1389,
#1266).
- Cloudflare DO-RPC recovery: Persisted backend subscriptions and restored
client stores after Durable Object reconstruction so live updates resume after
deployment, eviction or hibernation. Reverse-RPC callbacks now receive
syncUpdateRpc(payload, storeId) so clients can reopen the correct store.
Thanks @bohdanbirdie
(#1415,
#1462,
#1545).
- Cloudflare DO-RPC shutdown: Graceful store.shutdown() now unsubscribes
the client's live pull without removing a replacement store's subscription.
Hibernating clients retain their subscriptions. Thanks @bohdanbirdie
(#1418).
- Cloudflare HTTP sync: Forwarded client payload to onPush, matching
WebSocket and DO-RPC transports. Payload validation may now reject HTTP pushes
that previously arrived with undefined. Thanks @bohdanbirdie
(#1417).
- Browser rebases: Preserved rollback metadata for accepted local events so
conflicting backend events can be rolled back and rebased correctly.
Thanks @victornyberg and @slashv
(#1472).
- Store shutdown: Orderly shutdown now drains admitted client events to the
leader before closing the store. Commits remain sync
v0.5.0-dev.1预发布2026-10-13
Changed
- SQLite schema tables: Fixed Date fields in State.SQLite.table({ schema })
so their codecs round-trip through SQLite in structs and Schema.Class rows
while preserving Date checks and transformations, including nullable encoded
Dates. Thanks @acusti for the original fix
(#1596,
#1597).
- Effect dependencies: Updated the aligned Effect 4 dependency cohort from
4.0.0 to 4.0.3, including its AI, OpenTelemetry, platform, SQLite, and
Vitest packages. Applications using Effect should align their dependencies
to 4.0.3 or a compatible later 4.x release
(#1669).
- Contributor meetings: Added the canonical docs schedule for the next two
fortnightly meetings at 19:00 Berlin, automatic Google Calendar publishing,
and a stable Riverside room link
(#1635).
- Store commits: Fixed the callback form of store.commit and its TypeScript
overloads, including calls with commit options. Synchronous callbacks return
an event array that is collected before materialization, and throwing callbacks
apply no events (#1611,
#1616).
- Cloudflare sync telemetry: Added optional Effect tracer layers via otel: layer.
Telemetry cleanup runs in the background, and finite WebSocket operations and
DO-RPC pull streams now emit their sync spans
(#1618).
- Cloudflare adapter: Track state database ownership and remove obsolete
tracked state after successful boot, preserving the current state, eventlog
and untracked files. Failed cleanup is retried on a later boot without
blocking the completed store
(#1555).
- Schema rebuilds: Batched eventlog replay to reduce repeated SQLite page
writes, including billed row writes on Cloudflare Durable Objects. Replay order
and recovery from incomplete rebuilds are preserved. Clients can tune the
event-count batch per runtime with params.stateRebuildBatchSize (a positive
integer, default 100); lower values trade more queries and writes for smaller batches
(#1555).
- State recovery: Interrupted rematerialization is retried from clean derived
state instead of reopening partial results. Completion is recorded after all
migration hooks finish. Browser fast-path startup waits for recovery when its
snapshot is incomplete. The eventlog and pending events are preserved
(#1605).
- Cloudflare sync: Serialize push admission through pull publication so an
accepted event cannot advance the backend head without notifying subscribers
(#1537).
- Cloudflare WebSocket sync: Live pulls interrupted after the sync Durable
Object hibernates now receive their terminal RPC Exit, matching interruption
behavior before hibernation. Completed and protocol-defected pulls are also
removed from persisted fan-out state
(#1418).
- Cloudflare sync: Fixed live WebSocket pulls stopping permanently after a
disconnect. Pulls now resume after reconnect without reloading the client,
and HTTP transport failures also remain retryable. Offline pulls wait for
reconnection rather than spinning, and resume as soon as the backend reports
connected. Capped fallback probes cover stale connectivity signals and still
wake immediately on later disconnect/reconnect transitions.
Protocol failures stay terminal
(#1650).
For the root-cause analysis, thanks @bohdanbirdie.
- Cloudflare DO-RPC sync: A temporary Durable Object RPC failure no longer
stops replication for good. A call that Cloudflare marks retryable (and not
overloaded) now surfaces as IsOfflineError, so the leader retries the pull
after a jittered exponential backoff (1 s doubling to 30 s) on a fresh stub.
Interrupted catch-up streams also recover when Cloudflare drops the error
flags or the stream stalls for 60 seconds, resuming after the last applied
event. Idle live subscriptions do not time out. Explicit overload and
non-retryable remote failures keep their previous terminal handling
(#1462,
#1649).
- Removed redundant devenv package entries now owned by the task guard modules.
- Sync correctness: Prevented later client-session events from crossing an
older rejected pending prefix, and made leader admission retain explicit
reservation ownership through queue drain until apply, rejection, or stale
dropping. Parent contiguity now compares DAG position independently of local
rebase generation while stale epochs remain checked separately, avoiding
duplicate materialization and ghost fences during multi-writer rebases
(#1530).
- Expo getting-started docs: The manual install command now installs
@livestore/sync-cf instead of the import subpath @livestore/sync-cf/client,
which package managers resolved as a git URL and failed to install
(#1657,
#1667).
Breaking Changes
- Effect 4 / LiveStore 0.5: Upgrade application dependencies and schema APIs
from Effect 3 to stable Effect 4. Follow the
0.4 to 0.5 upgrade guide
for peer packages, schema substitutions, removed utilities, commit callbacks
and Cloudflare DO-RPC changes
(#1310,
#1647).
- Cloudflare adapter: createStoreDo, createStoreDoPromise and
makeDoRpcSync take getSyncBackendStub: () => stub instead of
syncBackendStub. LiveStore calls it for every sync call, because Cloudflare
leaves a stub broken after many exceptions. Replace
syncBackendStub: env.SYNCBACKENDDO.getByName(storeId) with
getSyncBackendStub: () => env.SYNCBACKENDDO.getByName(storeId)
(#1462,
#1649).
- Store commit callbacks: Callbacks now synchronously return an event array.
Replace store.commit((commit) => { commit(event) }) with
store.commit(() => [event]) or store.commit(event)
(#1611,
#1616).
- Rebuild completion tracking: The first open after upgrading from a version
without the completion marker rebuilds derived state once. No application
configuration changes are needed. Cloudflare deployments should budget for
replay duration and row writes. Migration hooks must tolerate retries after
interrupted rebuilds (#1605).
- State schema fingerprints: Replaced Effect-internal AST hashing with a
LiveStore-owned canonical descriptor and a synchronous full-width SHA-256
fingerprint. No application schema or configuration changes are required.
The first open after upgrading intentionally creates a new state database and
rematerializes it once from the event log, so Cloudflare deployments should
plan for the corresponding row-write usage
(#1555).
- *
v0.5.0-dev.0预发布2026-08-24
Changed
- Cloudflare sync: Serialize push admission through pull publication so an
accepted event cannot advance the backend head without notifying subscribers
(#1537).
- Effect v4 dependency cohort: Updated the repository-wide Effect v4
dependency family from 4.0.0-beta.99 to 4.0.0-rc.111. Applications must
use rc.111 or a compatible later Effect 4 release. Effect removed
Schema.isDateValid because Schema.DateFromString and
Schema.DateFromMillis now reject invalid dates on their own, so
Schema.DateFromString.check(Schema.isDateValid()) becomes plain
Schema.DateFromString. SQLite column inference also preserves INTEGER and
BLOB storage for refined Schema.DateFromMillis and Schema.Uint8Array
(#1557,
Effect-TS/effect#6620).
Thanks @JamieMason for the migration work.
- Removed redundant devenv package entries now owned by the task guard modules.
- Sync correctness: Prevented later client-session events from crossing an
older rejected pending prefix, and made leader admission retain explicit
reservation ownership through queue drain until apply, rejection, or stale
dropping. Parent contiguity now compares DAG position independently of local
rebase generation while stale epochs remain checked separately, avoiding
duplicate materialization and ghost fences during multi-writer rebases
(#1530).
Internal Changes
For maintainers and contributors:
- Release tooling: Pull-request CI now packs exact-head snapshot candidates
for forks without secrets. Maintainers can allow npm publication for a fork's
current and later PR heads with the revocable ci:publish-snapshot label
(#1559). The trusted
publisher leaves npm registry configuration unset so actions/setup-node
does not inject its token-auth placeholder into the OIDC-only job.
- Effect rc.111 API burndown: Ported the internal Effect surface that moved
between beta.99 and rc.111 — Schema.TaggedErrorClass →
Schema.TaggedError, Schema.UnknownFromJsonString →
Schema.fromJsonString(Schema.Unknown), Schema.toArbitraryLazy →
Schema.toArbitrary, Schedule.andThen → Schedule.concat, and the
SchemaIssue constructors that dropped their actual argument. SQLite column
inference now keys off the open representation annotation instead of the
removed typeConstructor/meta annotations, and JSON-string columns are
detected through the application/json content annotation now that
SchemaTransformation.fromJsonString is a factory rather than a singleton.
Schema issues no longer carry a toString()
(Effect-TS/effect#7093), so
the Durable Object RPC server renders decode failures through
SchemaIssue.makeFormatterDefault() like the rest of the codebase.
The @effect/vitest record-arbitrary workaround was dropped because
Effect-TS/effect#7148 fixed it
upstream (#1557).
- Tooling: Shell entry no longer runs the full TypeScript build after
dependency and generated-source setup. The shared Effect-utils
otel:profile:setup task captures the strict setup graph through native
devenv tracing and otelite; otel:verify:setup gates the connected trace
shape without a repository-local orchestration module
(#1402).
- Tooling: Unit-test failures now block merges. The test-unit job ran
packages/@livestore/webmesh and tests/package-common through
Effect.ignore on CI, so their failures produced a passing required check.
Removing that also restores the intent-layer invariant suite as a real gate on
context/ changes (#1404).
- Tooling: The DevTools Playwright suite is currently broken (0/15) and
carries a declared, expiring quarantine entry instead of an unrecorded
|| echo wrapper. Its check does not gate merges yet — the quarantine
records the failure with a reason, an issue, and an expiry date rather than
hiding it (#1489).
- Tooling: Cloudflare sync-provider failures now block merges. All six cf-*
matrix cells previously exited 0 on failure, which is why the Durable Object
hibernation guards could not gate merges
(#1404).
v0.4.02026-06-02
> Installing v0.4.0: Make sure all LiveStore packages use the same version:
>
> ``bash
> pnpm add @livestore/livestore @livestore/adapter-web @livestore/wa-sqlite @livestore/react
> # Or for Cloudflare
> pnpm add @livestore/livestore @livestore/adapter-cloudflare @livestore/sync-cf
> `
Highlights
- New Cloudflare adapter: Added the Workers/Durable Object adapter and rewrote the sync provider so LiveStore ships WebSocket, HTTP, and Durable Object RPC transports as first-party Cloudflare options (#528, #591).
- S2 sync backend: Map LiveStore's event log onto S2's durable stream store via @livestore/sync-s2, unlocking scalable basins/streams, SSE live tails, and transport-safe batching for large sync workloads (#292, #709).
- Schema-first tables: LiveStore now accepts Effect schema definitions as SQLite table definitions, removing duplicate column configuration in applications (#544).
- Cloudflare sync provider storage: Default storage is now Durable Object (DO) SQLite, with an explicit option to use D1 via a named binding. Examples and docs updated to the DO‑by‑default posture (see issue #266, #693).
- MCP support: LiveStore now ships a CLI with a first-class MCP server so automation flows can connect to instances, query data, and commit events using the bundled tools (#705).
- React multi-store API: The multi-store API is now the primary React integration, replacing <LiveStoreProvider> with <StoreRegistryProvider> and useStore() with store options. The new API supports multiple stores, preloading, and caching out of the box. See the React integration docs (#841).
Breaking Changes
- store.shutdown API: The shutdown method now returns an Effect instead of a Promise. Use yield* store.shutdown() inside Effects or await store.shutdownPromise() when a Promise is needed.
`typescript
// Before
await store.shutdown()
// After (Effect API)
yield * store.shutdown()
// Or use the Promise helper
await store.shutdownPromise()
`
- store.subscribe callback signature: The subscription callback is now passed as the second argument, with subscription options moved to an optional third argument object. Replace usages like store.subscribe(query$, { onUpdate }) with store.subscribe(query$, onUpdate, options).
- QueryBuilder.first() behaviour: table.query.first() now returns undefined when no rows match. To keep the old behaviour, pass { behaviour: "error" }, or supply a fallback.
`typescript
// Before: threw an error when no rows matched
const user = table.query.first() // throws
// After: returns undefined when no rows match
const user = table.query.first() // returns undefined
// To preserve old behaviour
const strictUser = table.query.first({ behaviour: 'error' })
// Or provide a fallback value
const fallbackUser = table.query.first({
behaviour: 'fallback',
fallback: () => ({ id: 'default', name: 'Guest' }),
})
`
- Raw SQL event availability: The livestore.RawSql event is no longer added automatically. Define it explicitly when needed (#469):
`typescript
import { Events, Schema } from '@livestore/livestore'
const rawSqlEvent = Events.clientOnly({
name: 'livestore.RawSql',
schema: Schema.Struct({
sql: Schema.String,
bindValues: Schema.optional(Schema.Record({ key: Schema.String, value: Schema.Any })),
writeTables: Schema.optional(Schema.ReadonlySet(Schema.String)),
}),
})
`
- wa-sqlite version alignment: @livestore/wa-sqlite now follows LiveStore's versioning scheme to keep adapters on matching releases.
`bash
# Before: wa-sqlite had independent versioning
pnpm add wa-sqlite@1.0.5
# After: wa-sqlite follows LiveStore versioning
pnpm add @livestore/wa-sqlite@dev
`
This change affects projects that directly depend on wa-sqlite. Most users rely on it indirectly through LiveStore adapters and don't need to change anything.
- Cloudflare sync provider storage selection: Removed implicit D1 auto‑selection and env‑based fallbacks. D1 must be selected explicitly via storage: { _tag: 'd1', binding: 'DB' } on the sync Durable Object. The default is DO SQLite (see issue #266, #693).
Before (implicit D1 when env.DB was present):
`ts
export class SyncBackendDO extends makeDurableObject({
// storage engine auto‑selected based on env
}) {}
`
After (explicit binding for D1):
`ts
// wrangler.toml
// [[d1_databases]]
// binding = "DB"
// database_name = "your-db"
// database_id = "..."
// code
export class SyncBackendDO extends makeDurableObject({
storage: { _tag: 'd1', binding: 'DB' },
}) {}
`
To use the default DO SQLite, omit the storage option or pass { _tag: 'do-sqlite' }.
- Restructured LiveStoreEvent and EventSequenceNumber APIs: Types are now organized into symmetric Global, Client, and Input namespaces that clarify the distinction between sync backend format, client format, and events without sequence numbers (#855):
| Old Name | New Name |
| ----------------------------------------------- | ----------------------------------------------- |
| LiveStoreEvent.AnyEncodedGlobal | LiveStoreEvent.Global.Encoded |
| LiveStoreEvent.AnyEncoded | LiveStoreEvent.Client.Encoded |
| LiveStoreEvent.AnyDecoded | LiveStoreEvent.Client.Decoded |
| LiveStoreEvent.PartialAnyEncoded | LiveStoreEvent.Input.Encoded |
| LiveStoreEvent.PartialAnyDecoded | LiveStoreEvent.Input.Decoded |
| LiveStoreEvent.EncodedWithMeta | LiveStoreEvent.Client.EncodedWithMeta |
| EventSequenceNumber.GlobalEventSequenceNumber | EventSequenceNumber.Global |
| EventSequenceNumber.globalEventSequenceNumber | EventSequenceNumber.Global.make |
| EventSequenceNumber.localEventSequenceNumber | EventSequenceNumber.Client.make |
| EventSequenceNumber.clientDefault | EventSequenceNumber.Client.DEFAULT |
| EventSequenceNumber.rebaseGenerationDefault | EventSequenceNumber.REBASEGENERATIONDEFAULT |
| LiveStoreEvent.EventDefPartialSchema | LiveStoreEvent.EventDefInputSchema |
| LiveStoreEvent.makeEventDefPartialSchema | LiveStoreEvent.makeEventDefInputSchema |
`typescript
// Before
import { LiveStoreEvent, EventSequenceNumber } from '@livestore/livestore'
const event: LiveStoreEvent.AnyEncoded = { ... }
const globalSeq: EventSequenceNumber.GlobalEventSequenceNumber = 1
// After
import { LiveStoreEvent, EventSequenceNumber } from '@livestore/livestore'
const event: LiveStoreEvent.Client.Encoded = { ... }
const globalSeq: EventSequenceNumber.Global = 1
`
- Error class rename: UnexpectedError has been renamed to UnknownError for better semantic clarity and consistency with Effect ecosystem naming conventions. The previous name conflicted with Effect's terminology where "unexpected errors" refer to defects, while this error type represents errors of unknown type from external libraries or infrastructure failures (See PR #823).
Update all references:
- Class name: UnexpectedError → UnknownError
- Error tag: 'LiveStore.UnexpectedError' → 'UnknownError'
- Static methods: mapToUnexpectedError → mapToUnknownError
- Related type: MergeResultUnexpectedError → MergeResultUnknownError
``typescript
// Before
import { UnexpectedError } from '@livestore/common'
effect.pipe(UnexpectedError.mapTo
v0.4.0-dev.27预发布2026-05-22
Release 0.4.0-dev.27
v0.4.0-dev.26预发布2026-05-13
Release 0.4.0-dev.26
v0.4.0-dev.25预发布2026-05-12
Release 0.4.0-dev.25
v0.4.0-dev.24预发布2026-05-08
Release 0.4.0-dev.24
"v0.4.0-dev.23"预发布2026-04-29
Release 0.4.0-dev.23.
<!-- agent-footer:begin v=1 -->
<details>
<summary>Posted on behalf of @schickling</summary>
| field | value |
| --- | --- |
| agent_name | 🌱 co1-alder |
| agentsessionid | 6c624c62-4e38-435e-b267-475ef99d9340 |
| agent_tool | Codex CLI |
| agenttoolversion | codex-cli 0.124.0 |
| agent_runtime | Codex CLI codex-cli 0.124.0 |
| agent_model | unknown |
| worktree | megarepo-all/schickling/2026-04-26-livestore-release |
| machine | dev3 |
| tooling_profile | dotfiles@19cf6f4 |
</details>
<!-- agent-footer:end -->
"v0.4.0-dev.22"预发布2025-12-24
"Release 0.4.0-dev.22 including Chrome Extension"