Skip to content

Packages

Database prototype

An experimental Autobase adapter for offline writes, writer membership and convergence.

Verified 16 October 2026

Prototype with explicit engine opt-in

The /db prototype targets the alpha.2 source candidate. Install autobase@7.28.2 explicitly to use it. The root P2P import does not load it, and ordinary consumers do not install this optional peer automatically. This prototype is separate from the existing experimental Autobee scaffold.

Applications supply a deterministic reducer and local view. Autobase orders writer logs so devices can converge after offline edits; application rules still decide what conflicting edits or deletes mean.

  • autobaseAdapter({ openView, apply, validate, closeView }) defines application-owned view behavior. openDatabase({ node, store, adapter, key, encryptionKey }) opens a local database and attaches replication to the P2P swarm.
  • append(operation) accepts a bounded JSON operation and returns a local-applied receipt. db.view provides application queries; update() processes available data without claiming every peer is caught up.
  • members.add(writerKey) and members.remove(writerKey) are restricted to the founding writer. New writers are non-indexers and receive no membership administration rights.
  • state(), watch(callback) and waitFor(predicate, { timeoutMs, signal }) expose local progress. Signed system checkpoints do not prove that a remote host retained every application resource.
  • close() releases this database's discovery lease, view and child store session. Close databases before their node and root store; other sockets and caller-owned stores remain available.

Distributed data boundaries

Local writes can proceed offline, while stable progress depends on available indexers. Reducers must be replayable and deterministic. Writer removal takes effect as history synchronizes; it does not erase downloaded data or rotate encryption keys. Pairing at the RPC layer does not grant database write authority.

Real tests cover offline conflict convergence, writer admission/removal, encrypted reconstruction from a retained reader and coexistence with RPC on a paired P2P connection. They do not establish complete backup, lost-admin recovery, automatic schema migration or multi-writer plus Personal Node sync support.

Need help? Report an issue with your CLI version, platform, command and first relevant error.