Storage and snapshots

V5 storage is a single committed image with snapshot readers. Object and event segments are immutable. Readers can observe a snapshot while a writer prepares the next commit. The committed bytes are replaced with a temp file, fsync, and rename. They are not edited in place.

Node durable storage lives on @knolo/core/node. An optional lease records a local owner beside the image:

Examplets
import { DurableKnowledgeImageStoreV5 } from '@knolo/core/node';

const store = DurableKnowledgeImageStoreV5.open('./knowledge.v5', image, {
  lease: {
    ownerId: 'knowledge-host-1',
    ttlMs: 30_000,
    now: () => Date.now(),
  },
});

The lease rejects a second writer while it is live. Expiry does not delete the lock. Recovery is explicit: open with recoverStale: true, or call recoverStaleWriterLeaseV5 after the host's stale-writer policy has confirmed expiry. A live lease and a malformed record stay errors.

The lease is a local coordination primitive. It is not a distributed consensus protocol and it is not an authority credential. See Coordination.

Multi-writer replication across hosts is not a V5 storage mode. Sync and merge stay explicit. See Sync and merge.