open-brainy/src
David Snelling 478fa176f2 refactor(8.0): delete DataAPI — superseded by Db persist/restore + import API + stats
The legacy backup/import/export/stats facade (src/api/DataAPI.ts) drifted
from the modern entity shape and every job it did now has a first-class
surface. Delete it and brain.data(), and rewire the CLI:

- data-stats → brain.stats() (full BrainyStats report: per-type breakdowns,
  indexed fields, index health, storage backend, writer lock, version)
- clean → brain.clear()
- export → alias of snapshot; a db.persist() snapshot is the full-fidelity
  export format (open with Brainy.load, load wholesale with brainy restore);
  external data ingestion remains brainy import (UniversalImportAPI)

Rewiring clean onto brain.clear() exposed two real bugs, both fixed:

- clear() left this.graphIndex undefined forever — any graph-touching call
  afterwards (relate, getNeighbors, stats) crashed. clear() now re-resolves
  the graph index exactly as init() does and re-wires the shared UUID↔int
  resolver, and re-resolves the metadata index with the same provider
  fallback as init().
- storage.clear() reset the legacy totals but not the per-type/subtype
  count rollups or id→type caches, so stats() reported phantom counts for
  deleted entities. Both adapters now delegate derived-state reset to
  reloadDerivedState(), the same path restore-from-snapshot uses.

One-shot CLI commands (data-stats, clean, snapshot/export, restore,
history, generation) now close the brain and exit explicitly — global
cache timers otherwise keep the process alive holding the writer lock.

Verified: build clean, 1383/1383 unit tests, 24/24 db-mvcc integration,
plus an end-to-end CLI smoke (add → data-stats → export → clean →
data-stats).
2026-06-11 09:05:12 -07:00
..
aggregation fix: internal subtype consistency + brain.audit() diagnostic + improved enforcement errors 2026-06-08 11:31:47 -07:00
api refactor(8.0): delete DataAPI — superseded by Db persist/restore + import API + stats 2026-06-11 09:05:12 -07:00
cli refactor(8.0): delete DataAPI — superseded by Db persist/restore + import API + stats 2026-06-11 09:05:12 -07:00
config chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00
critical feat: replace transformers.js with direct ONNX WASM for Bun compatibility 2025-12-17 17:42:37 -08:00
data feat: Phase 3 - Unified Semantic Type Inference (Nouns + Verbs) 2025-10-16 10:59:26 -07:00
db feat(8.0): full query surface at historical generations via ephemeral index materialization 2026-06-11 08:12:11 -07:00
distributed chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00
embeddings chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading 2026-06-09 16:38:30 -07:00
errors fix: find()/stats() correctness + Cortex compat (BR-FIND-WHERE-ZERO, BR-DEFENSIVE-INTERFACE) 2026-05-15 12:31:28 -07:00
graph feat(8.0): full query surface at historical generations via ephemeral index materialization 2026-06-11 08:12:11 -07:00
hnsw feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
import chore(8.0): Phase A + B — purge all @deprecated APIs + cacheManager dead branches 2026-06-09 15:33:56 -07:00
importers fix: internal subtype consistency + brain.audit() diagnostic + improved enforcement errors 2026-06-08 11:31:47 -07:00
indexes/columnStore feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
integrations chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00
interfaces chore(8.0): Phase A + B — purge all @deprecated APIs + cacheManager dead branches 2026-06-09 15:33:56 -07:00
mcp chore(8.0)!: drop browser support, cloud SDKs, legacy pipeline, dead threading 2026-06-09 16:38:30 -07:00
migration feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
neural fix: recalibrate find({ limit }) cap + two-tier enforcement + caller location 2026-06-08 12:49:43 -07:00
patterns 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
scripts feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
storage refactor(8.0): delete DataAPI — superseded by Db persist/restore + import API + stats 2026-06-11 09:05:12 -07:00
streaming feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
transaction feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
triple chore(8.0): Phase A + B — purge all @deprecated APIs + cacheManager dead branches 2026-06-09 15:33:56 -07:00
types feat(8.0): full query surface at historical generations via ephemeral index materialization 2026-06-11 08:12:11 -07:00
universal fix: prevent fs adapter from throwing on import in browser 2025-09-17 16:22:02 -07:00
utils feat(8.0): u64 BigInt graph provider contract — punch list a-d,g,h 2026-06-10 10:45:45 -07:00
vfs feat(8.0)!: delete fork/branch/commit/history/versions — superseded by the Db API 2026-06-10 15:22:47 -07:00
brainy.ts refactor(8.0): delete DataAPI — superseded by Db persist/restore + import API + stats 2026-06-11 09:05:12 -07:00
coreTypes.ts fix(8.0): createIndex resolves the canonical 'vector' provider key — drop diskann/hnsw key lookups + legacy migration APIs 2026-06-10 11:29:05 -07:00
index.ts feat(8.0): full query surface at historical generations via ephemeral index materialization 2026-06-11 08:12:11 -07:00
internals.ts feat(8.0): EntityIdMapper U32 ceiling + EntityIdSpaceExceeded error 2026-06-02 10:20:01 -07:00
plugin.ts feat(8.0): generational MVCC storage + Datomic-style Db API (now/transact/asOf/with/persist) 2026-06-10 14:14:07 -07:00
setup.ts chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00
unified.ts chore(8.0): collapse dead defensive guards + redundant polyfills 2026-06-09 16:46:16 -07:00