Skip to content

StoreInternals

StoreInternals = object

Defined in: packages/@livestore/livestore/src/store/store-types.ts:88

Opaque bag containing the Store’s implementation details.

Not part of the public API — shapes and semantics may change without notice. Access only from within the @livestore/livestore package (and Devtools) via StoreInternalsSymbol to avoid accidental coupling in application code.

readonly activeQueries: ReferenceCountedSet<LiveQuery<any>>

Defined in: packages/@livestore/livestore/src/store/store-types.ts:151

Set of currently subscribed LiveQuery instances (reference‑counted). Used for Devtools and diagnostics.


readonly boot: Effect.Effect<void, UnknownError, Scope.Scope>

Defined in: packages/@livestore/livestore/src/store/store-types.ts:164

Starts background fibers for sync and observation. Must be run exactly once per Store instance. Scoped; installs finalizers to end spans and detach reactive refs.


readonly clientSession: ClientSession

Defined in: packages/@livestore/livestore/src/store/store-types.ts:103

The active client session backing this Store. Provides access to the leader thread, network status, and shutdown signaling.

Do not close or mutate directly — use store.shutdown(...).


readonly effectContext: object

Defined in: packages/@livestore/livestore/src/store/store-types.ts:117

Effect runtime and scope used to fork background fibers for the Store.

  • runtime executes effects from imperative Store APIs.
  • lifetimeScope owns forked fibers; closed during Store shutdown.

readonly lifetimeScope: Scope.Scope

Scope that owns all long‑lived fibers spawned by the Store.

readonly runtime: Runtime.Runtime<Scope.Scope>

Effect runtime to run Store effects with proper environment.


readonly eventSchema: Schema.Schema<Decoded, Encoded>

Defined in: packages/@livestore/livestore/src/store/store-types.ts:95

Runtime event schema used for encoding/decoding events.

Exposed primarily for Devtools (e.g. databrowser) to validate ad‑hoc event payloads. Application code should not depend on it directly.


isShutdown: boolean

Defined in: packages/@livestore/livestore/src/store/store-types.ts:170

Tracks whether the Store has been shut down. When true, mutating APIs should reject via checkShutdown.


readonly otel: StoreOtel

Defined in: packages/@livestore/livestore/src/store/store-types.ts:128

OpenTelemetry primitives used for instrumentation of commits, queries, and Store boot lifecycle.


readonly reactivityGraph: ReactivityGraph

Defined in: packages/@livestore/livestore/src/store/store-types.ts:135

The Store’s reactive graph instance used to model dependencies and propagate updates. Provides APIs to create refs/thunks/effects and to subscribe to refresh cycles.


readonly sqliteDbWrapper: SqliteDbWrapper

Defined in: packages/@livestore/livestore/src/store/store-types.ts:109

Wrapper around the local SQLite state database. Centralizes query planning, caching, and change tracking used by reads and materializers.


readonly syncProcessor: ClientSessionSyncProcessor

Defined in: packages/@livestore/livestore/src/store/store-types.ts:157

Client‑session sync processor orchestrating push/pull and materialization of events into local state.


readonly tableRefs: Readonly<Record<string, Ref<null, ReactivityGraphContext, RefreshReason>>>

Defined in: packages/@livestore/livestore/src/store/store-types.ts:145

Per‑table reactive refs used to broadcast invalidations when materializers write to tables. Values are always null; equality is intentionally false to force recomputation.

Keys are SQLite table names (user tables; some system tables may be intentionally excluded from refresh).