nedb-engine 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,234 +2,298 @@
2
2
 
3
3
  # NEDB
4
4
 
5
- **A versioned, self-compressing, time-traveling embedded database.**
5
+ **Hash-chained · time-traveling · bi-temporal · causally-provable embedded database.**
6
6
 
7
- Replay-protected · idempotent · relational · filterable · sortable · searchable · provable.
7
+ Replay-protected · idempotent · relational · filterable · sortable · searchable · concurrent.
8
8
  One Rust core → ships to **PyPI** and **npm** from a single source.
9
9
 
10
- **[Website & docs → eth-interchained.github.io/nedb](https://eth-interchained.github.io/nedb/)**
10
+ [![PyPI](https://img.shields.io/pypi/v/nedb-engine?label=PyPI&color=6366f1)](https://pypi.org/project/nedb-engine/)
11
+ [![npm](https://img.shields.io/npm/v/nedb-engine?label=npm&color=00d4ff)](https://www.npmjs.com/package/nedb-engine)
12
+ [![Tests](https://img.shields.io/badge/tests-266%20passing-34d399)](https://github.com/Eth-Interchained/nedb/actions)
13
+
14
+ **[Studio → studio.interchained.org](https://studio.interchained.org)** · **[nedb.aiassist.net](https://nedb.aiassist.net)**
11
15
 
12
16
  </div>
13
17
 
14
18
  ---
15
19
 
16
- ## Why NEDB
17
-
18
- Redis is fast because it's in-memory and simple — but relations are hand-rolled, history is gone the moment you overwrite, and every call pays a network hop. NEDB keeps the speed and adds the things real systems actually need:
20
+ ## What makes NEDB different
19
21
 
20
- - **Faster-than-Redis latency where it's honest to claim it** NEDB runs **embedded, in-process**, so point reads pay *no socket hop*. The networked server (`nedbd`, RESP-compatible) competes on the Rust core's merits.
21
- - **Replay protection + idempotency in the core, not the app.** Every write carries a strictly-monotonic per-client nonce and an optional idempotency key. Retries are no-ops; stale/out-of-order ops are rejected. This is built into one **hash-chained, append-only log**.
22
- - **Time-travel.** Read the database *exactly as it existed* at any past sequence — `AS OF seq`. Debugging, audit, MVCC snapshots, and deterministic replay all fall out of the same log.
23
- - **Durable persistence, Redis-style.** Point a database at a path and every op is appended to the hash-chained log on disk (and `fsync`'d); it reloads by replaying that log on open. It's exactly Redis's AOF model — except the append-only log is the *same tamper-evident chain* the engine already trusts, so `verify()` and `AS OF` hold across restarts and the log is never rewritten.
24
- - **First-class relations.** Adjacency-list graph edges with O(1) traversal — *and the graph time-travels too*.
25
- - **Filter / sort / search.** Equality, ordered, and full-text inverted indexes, maintained incrementally.
26
- - **git-style files with maximum compression.** Content-defined chunking + content-addressed dedup + temperature tiers (fast warm codec, max-ratio cold archival). Every file version has a Merkle root you can **anchor on-chain**.
22
+ Every database stores *what*. NEDB stores *what*, *when*, *when it was true*, and *why* all sealed in a cryptographic hash chain that proves none of it was tampered with.
27
23
 
28
- > **The keystone:** one nonce-enforced append-only log is the substrate for idempotency, replay protection, crash recovery, MVCC, *and* time-travel — simultaneously.
24
+ | Capability | NEDB | SQLite | Redis | MongoDB |
25
+ |---|:---:|:---:|:---:|:---:|
26
+ | Hash-chained tamper evidence | ✅ | ❌ | ❌ | ❌ |
27
+ | Time-travel reads (`AS OF seq`) | ✅ | ❌ | ❌ | ❌ |
28
+ | Bi-temporal (`VALID AS OF date`) | ✅ | ❌ | ❌ | ❌ |
29
+ | Causal Write Provenance | ✅ | ❌ | ❌ | ❌ |
30
+ | Replay-protected idempotent writes | ✅ | ❌ | ❌ | ❌ |
31
+ | SQL + Redis + MongoDB adapters | ✅ | — | — | — |
32
+ | Concurrent group-commit daemon | ✅ | ❌ | ✅ | ✅ |
33
+ | At-rest AES-256-GCM encryption | ✅ | ❌ | ❌ | — |
29
34
 
30
35
  ---
31
36
 
32
- ## Quickstart (Python reference engine — runs today, zero build)
37
+ ## Install
33
38
 
34
39
  ```bash
35
- git clone https://github.com/Eth-Interchained/nedb && cd nedb
36
- pip install -e . # pure-Python reference; no toolchain needed
37
- python3 examples/demo.py # see every feature
38
- python3 tests/test_nedb.py # 11/11 invariants
40
+ pip install nedb-engine # Python ≥ 3.8 — pure-Python + optional Rust native wheel
41
+ npm install nedb-engine # Node 16 — napi-rs prebuilt binaries
39
42
  ```
40
43
 
44
+ ---
45
+
46
+ ## Python — 5-minute tour
47
+
41
48
  ```python
42
49
  from nedb import NEDB
43
50
 
44
- db = NEDB("./mydata") # durable: append-only log on disk, reloads on open
45
- # db = NEDB() # (no path = purely in-memory)
46
- db.create_index("users", "status", "eq")
47
- db.create_index("users", "age", "ordered")
48
- db.create_index("users", "bio", "search")
49
-
50
- db.put("users", "alice", {"name": "Alice", "age": 31, "status": "active",
51
- "city": "Austin", "bio": "rust systems hacker"})
51
+ db = NEDB("./mydata") # durable: every op is AOF-logged, fsync'd, and hash-chained
52
+ # db = NEDB() # or in-memory
52
53
 
53
- # Idempotent, replay-protected write (safe to retry forever):
54
- db.put("orders", "o1", {"total": 42}, client="checkout", nonce=7, idem="charge-o1")
54
+ db.create_index("users", "status", "eq")
55
+ db.create_index("users", "bio", "search")
55
56
 
56
- # NQL filter + sort
57
- db.query('FROM users WHERE age >= 25 AND status = "active" ORDER BY age DESC')
57
+ db.put("users", "alice", {"name": "Alice", "age": 31, "status": "active", "bio": "rust hacker"})
58
+ db.put("users", "bob", {"name": "Bob", "age": 24, "status": "active", "bio": "python dev"})
58
59
 
59
- # Full-text search
60
+ # NQL: WHERE + ORDER BY + LIMIT + SEARCH + TRAVERSE + GROUP BY
61
+ db.query('FROM users WHERE status = "active" ORDER BY age ASC')
60
62
  db.query('FROM users SEARCH "rust"')
63
+ db.query('FROM users GROUP BY status COUNT')
64
+
65
+ # Time-travel — AS OF any past sequence
66
+ snap = db.seq
67
+ db.put("users", "alice", {"name": "Alice", "age": 32, "status": "retired"})
68
+ db.get("users", "alice", as_of=snap) # → age 31, status active
69
+
70
+ # Bi-temporal — VALID AS OF any past date
71
+ db.put("policy", "rate_2024", {"pct": 5.0}, valid_from="2024-01-01", valid_to="2024-12-31")
72
+ db.put("policy", "rate_2025", {"pct": 6.0}, valid_from="2025-01-01")
73
+ db.query('FROM policy VALID AS OF "2024-06-15"') # → rate 5.0
74
+
75
+ # Causal Write Provenance — why did this write happen?
76
+ db.put("inputs", "msg_1", {"text": "user prefers dark mode"})
77
+ seq_msg = db.seq
78
+ db.put("beliefs", "dark_mode", {"value": True},
79
+ caused_by=[seq_msg], evidence="user_message", confidence=0.95)
80
+ db.query('FROM beliefs WHERE _id = "dark_mode" TRACE caused_by') # → msg_1
81
+ db.query('FROM inputs WHERE _id = "msg_1" TRACE caused_by REVERSE') # → dark_mode
61
82
 
62
83
  # Relations + graph traversal
63
84
  db.link("users:alice", "follows", "users:bob")
64
- db.q("users").where("_id", "=", "alice").traverse("follows").run()
65
-
66
- # Time-travel
67
- s = db.seq
68
- db.put("users", "alice", {"name": "Alice", "city": "Lisbon", "age": 31, "status": "active"})
69
- db.get("users", "alice", as_of=s)["city"] # -> "Austin"
70
-
71
- # git-style files with Cascade compression + provable history
72
- v1 = db.put_file("notes.txt", open("notes.txt","rb").read())
73
- db.file_root("notes.txt", v1) # Merkle root — anchorable on ITC
74
-
75
- # Durable + provable across restarts
76
- db.close()
77
- db = NEDB("./mydata") # replays the log on open
78
- assert db.verify() # the hash chain is intact
79
- db.get("users", "alice", as_of=s)["city"] # AS OF still works -> "Austin"
85
+ db.query('FROM users WHERE _id = "alice" TRAVERSE follows')
86
+
87
+ # Hash-chain integrity
88
+ assert db.verify() # cryptographic proof — no tampering
89
+
90
+ # SQL, Redis, MongoDB compatibility adapters
91
+ from nedb import sql_exec, RedisCompat, MongoClient
92
+ sql_exec(db, "SELECT * FROM users WHERE status = 'active' ORDER BY age DESC")
93
+ r = RedisCompat(db); r.execute("HSET", "user:1", "name", "Alice")
94
+ MongoClient(db)["users"].find({"status": "active"}).sort("age", -1).to_list()
80
95
  ```
81
96
 
82
97
  ---
83
98
 
84
- ## Persistence
99
+ ## Node.js
85
100
 
86
- NEDB persists the way Redis does — by writing the operations, not by dumping pages — because the engine's whole thesis is that **state is a pure function of the log**.
101
+ ```javascript
102
+ import { NedbCore } from "nedb-engine";
87
103
 
88
- - `NEDB(path)` opens a **durable** database in a directory. Every op is appended to `log.aof` (one JSON line) and `fsync`'d; index configuration is snapshotted to `meta.json`. On open, NEDB replays the log to rebuild state.
89
- - `NEDB()` with no path is **in-memory** (unchanged).
90
- - The append-only log is the **same hash-chained, tamper-evident chain** that powers idempotency, replay protection, and time-travel — so `verify()`, `AS OF`, relations, and the anchorable head all survive a restart. The log is **never rewritten**, so the chain (and its commitment) stays provable.
104
+ const db = new NedbCore(); // in-memory
105
+ // const db = NedbCore.open("./data"); // durable
91
106
 
92
- ```python
93
- db = NEDB("./mydata")
94
- db.put("users", "alice", {"name": "Alice", "status": "active"})
95
- db.close() # flush + fsync
107
+ db.createIndex("users", "status", "eq");
108
+ db.put("users", "alice", JSON.stringify({ name: "Alice", age: 31, status: "active" }));
96
109
 
97
- again = NEDB("./mydata") # replays log.aof
98
- assert again.verify() # chain intact across the restart
99
- again.get("users", "alice") # -> {"name": "Alice", ...}
100
- ```
110
+ // Time-travel
111
+ const snap = db.seq(); // BigInt
112
+ db.put("users", "alice", JSON.stringify({ name: "Alice", age: 32, status: "retired" }));
113
+ JSON.parse(db.getAsOf("users", "alice", snap)).age; // → 31
101
114
 
102
- > Snapshotting (an RDB-style fast-load checkpoint that keeps the AOF intact) and Rust-core parity are tracked on the roadmap.
115
+ // Full NQL
116
+ const rows = db.query('FROM users WHERE status = "active" ORDER BY age ASC');
117
+ rows.map(r => JSON.parse(r));
118
+
119
+ // Tamper evidence
120
+ db.verify(); // → true
121
+ db.head(); // → 64-char BLAKE2b commitment hash
122
+ db.seq(); // → BigInt
123
+ ```
103
124
 
104
125
  ---
105
126
 
106
- ## nedbd — run NEDB as a server
127
+ ## nedbd — the concurrent server daemon
107
128
 
108
- For client/server setups (multiple apps, a remote admin UI like NEDB Studio, or just keeping the database in its own process), `pip install nedb-engine` ships a daemon. It runs the engine as a long-lived process and serves an HTTP/JSON API; each named database is a durable `NEDB(path)` held open in memory. Connect to it the way you'd connect to Redis or Postgres over a URL.
129
+ nedbd runs NEDB as a long-lived process with an HTTP/JSON API and an optional RESP2 wire protocol. Built on a **single-writer group-commit sequencer** parallel reads, batched durable writes, one hash-chain per database, zero write-write races.
109
130
 
110
131
  ```bash
111
- nedbd # http://127.0.0.1:7070, data in ./nedb-data
112
- # config via env: NEDBD_HOST, NEDBD_PORT, NEDBD_DATA, NEDBD_TOKEN (optional bearer auth)
132
+ nedbd # :7070, data ./nedb-data
133
+ NEDBD_RESP2_PORT=6380 nedbd # also speak RESP2 (redis-cli compatible)
134
+ nedbd --log-level 2 # 0=errors 1=requests 2=deploy 3=verbose
113
135
  ```
114
136
 
115
137
  ```bash
116
- # create a database (optionally seeded with indexes / rows / links)
117
- curl -X POST localhost:7070/v1/databases -d '{"name":"shop","init":{
118
- "indexes":[["users","status","eq"]],
119
- "seed":{"users":[{"id":"u1","name":"Ada","status":"active"}]}}}'
120
-
121
- # query it (real NQL, real engine)
122
- curl -X POST localhost:7070/v1/databases/shop/query -d '{"nql":"FROM users WHERE status = \"active\""}'
123
-
124
- # write, verify, time-travel — all server-side on the durable log
125
- curl -X POST localhost:7070/v1/databases/shop/put -d '{"coll":"users","id":"u2","doc":{"name":"Bo"}}'
126
- curl localhost:7070/v1/databases/shop/verify
138
+ # Create a database with seed data and relations
139
+ curl -X POST :7070/v1/databases -d '{
140
+ "name": "shop",
141
+ "init": {
142
+ "indexes": [["users","status","eq"]],
143
+ "seed": {"users": [{"_id":"u1","name":"Alice","status":"active"}]},
144
+ "links": [["users:u1","buys","orders:o1"]]
145
+ }}'
146
+
147
+ # Query (full NQL including time-travel and bi-temporal)
148
+ curl -X POST :7070/v1/databases/shop/query \
149
+ -d '{"nql":"FROM users WHERE status = \"active\" ORDER BY name ASC"}'
150
+
151
+ # Verify the hash chain
152
+ curl :7070/v1/databases/shop/verify
153
+
154
+ # MongoDB-compatible endpoint
155
+ curl -X POST :7070/v1/databases/shop/mongo \
156
+ -d '{"collection":"users","op":"find","filter":{"status":"active"},"limit":10}'
127
157
  ```
128
158
 
129
- API: `GET /health` · `GET|POST /v1/databases` · `GET|DELETE /v1/databases/<name>` · `POST …/query` · `POST …/put` · `POST …/index` · `POST …/link` · `DELETE …/rows/<coll>/<id>` · `GET …/verify` · `GET …/log`. Databases persist across daemon restarts (the engine replays its append-only log on open).
159
+ **From redis-cli no Redis installation needed:**
160
+ ```bash
161
+ redis-cli -p 6380 SELECT shop
162
+ redis-cli -p 6380 SELECT shop EVAL 'FROM users SEARCH "alice"' 0
163
+ redis-cli -p 6380 SELECT shop EVAL 'FROM users AS OF 10 WHERE status = "active"' 0
164
+ redis-cli -p 6380 SELECT shop EVAL 'FROM beliefs TRACE caused_by' 0
165
+ ```
130
166
 
131
167
  ---
132
168
 
133
169
  ## NQL — the NEDB Query Language
134
170
 
135
- One small grammar; the Rust parser is the single source of truth so Python and Node share identical semantics. A fluent builder compiles to the same plan.
136
-
137
171
  ```
138
172
  FROM <collection>
139
- [ AS OF <seq> ]
140
- [ WHERE <field> <op> <value> (AND ...)* ] op = != < <= > >=
141
- [ SEARCH "<text>" ]
173
+ [ AS OF <seq> ] transaction time (when was it written?)
174
+ [ VALID AS OF "<date>" ] valid time (when was it true in the world?)
175
+ [ WHERE <field> <op> <value> (AND ...) ] op: = != < <= > >=
176
+ [ SEARCH "<text>" ] full-text search
142
177
  [ ORDER BY <field> [ASC|DESC] ]
143
- [ TRAVERSE <relation> ]
178
+ [ TRAVERSE <relation> ] graph traversal
179
+ [ TRACE caused_by [REVERSE] ] causal provenance (why? / what did this cause?)
144
180
  [ LIMIT <n> ]
181
+ [ GROUP BY <field> [COUNT|SUM f|AVG f|MIN f|MAX f] ]
145
182
  ```
146
183
 
147
- ---
184
+ Combine both time axes:
185
+ ```python
186
+ # What did the system know at seq 200 about what was true on 2024-02-15?
187
+ db.query('FROM policy AS OF 200 VALID AS OF "2024-02-15"')
188
+ ```
148
189
 
149
- ## What's measured (v0.4.1 · pure Python · Linux x86_64)
190
+ ---
150
191
 
151
- Numbers from `python3 bench/benchmarks.py` reproducible, not cherry-picked.
152
- Full results in [`bench/RESULTS.md`](bench/RESULTS.md).
192
+ ## Performance (v1.0.x · Rust native · Linux x86_64 VPS)
153
193
 
154
- | Operation | Throughput | Latency |
194
+ | Operation | Throughput | Notes |
155
195
  |---|---|---|
156
- | GET (embedded, in-process) | **1.30M/s** | 0.77 µs |
157
- | GET AS OF (time-travel) | 997K/s | 1.00 µs |
158
- | PUT (logged, no index) | 63.7K/s | 15.7 µs |
159
- | PUT durable (AOF + fsync) | 7.0K/s | 143 µs |
160
- | QUERY: eq filter, eq index | **1.42M/s** | 0.71 µs |
161
- | QUERY: eq filter, no index (scan) | 515K/s | 1.94 µs |
162
- | QUERY: SEARCH (inverted index) | 467K/s | 2.14 µs |
163
- | SQL SELECT → NQL (adapter) | 1.70M/s | 0.59 µs |
164
- | AutoIndexDB wrapper overhead | ~0% | 0.54 µs |
165
- | File compression — warm | **39.9×** | — |
166
- | File compression — cold (LZMA) | **88.9×** | — |
167
- | Cross-version dedup | 20 of 22 chunks | — |
168
-
169
- The reference engine proves the **architecture**. Run `python3 bench/benchmarks.py --redis` to compare against Redis TCP on your own machine. The Rust core (`rust/`) is the future speed target.
196
+ | PUT (Rust napi, per-op FFI) | ~70K/s | FFI-bound; batch path: ~15K writes/s group-commit |
197
+ | GET (Rust napi, per-op FFI) | ~330K/s | FFI-bound |
198
+ | NQL query (Rust engine) | ~23 µs | faster than pure-Python (~120 µs) |
199
+ | Python PUT (AOF + fsync) | ~7K/s | Durable, per-op |
200
+ | Python GET (in-process) | ~1.3M/s | Zero socket hop |
170
201
 
171
202
  ---
172
203
 
173
204
  ## Architecture
174
205
 
175
206
  ```
176
- ┌──────────────────────────────────────────────┐
177
- put/del → │ OpLog (append-only · BLAKE3 hash chain · │ ← single source of truth
178
- link │ per-client nonce · idempotency keys)
179
- └───────────────┬──────────────────────────────┘
207
+ ┌──────────────────────────────────────────────────────────┐
208
+ put/del → │ OpLog (BLAKE2b hash chain · per-client nonce · │ ← single source of truth
209
+ link │ idempotency keys · causal provenance fields)
210
+ └───────────────┬──────────────────────────────────────────┘
180
211
  deterministic fold │ (state = pure function of the log)
181
- ┌──────────────┬───────┴────────┬───────────────────┐
182
- ▼ ▼ ▼
183
- MVCC store Relations Indexes BlobStore (Cascade)
184
- (time-travel) (graph, AS OF) eq/ordered/search CDC+dedup+tiers, Merkle roots
212
+ ┌──────────────┬──────────┴──────┬───────────────┬────────────────┐
213
+ ▼ ▼ ▼ ▼
214
+ MVCC store Relations Indexes CauseMap BlobStore
215
+ (time-travel) (graph+AS OF) eq/ord/search (reverse index) (Cascade CDC)
216
+
217
+ ┌─────────────────────────────────┐
218
+ Thread-safe → │ Sequencer (group-commit) │ ← single writer, parallel readers
219
+ │ — one committer thread/db │
220
+ │ — batch fsync │
221
+ └─────────────────────────────────┘
222
+
223
+ Compatibility adapters: SQL · Redis · MongoDB
224
+ Wire protocols: HTTP/JSON · RESP2
225
+ Encryption: AES-256-GCM at-rest (TMK/DEK double-envelope)
185
226
  ```
186
227
 
187
- PyPI ships a **universal pure-Python wheel** (`pip install nedb-engine` works on every platform/Python, and includes the `nedbd` server) — the engine, persistence, and daemon are all pure Python. npm ships **napi-rs** native addons. Native PyO3 acceleration for PyPI is additive/roadmap (the public API is identical with or without it). A RESP-compatible `nedbd` wire protocol and a WASM build are also on the roadmap.
188
-
189
- Full design: [`docs/SPEC.md`](docs/SPEC.md).
190
-
191
228
  ---
192
229
 
193
230
  ## Repo layout
194
231
 
195
232
  ```
196
- nedb/ pure-Python reference engine (this is what `pip install` ships today)
197
- rust/ production core — nedb-core + nedb-py (PyO3) + nedb-node (napi-rs)
198
- examples/demo.py end-to-end walkthrough
199
- tests/ invariant tests
200
- bench/ embedded micro-bench + Redis head-to-head harness
201
- docs/SPEC.md architecture specification
202
- .github/ release CI → PyPI + npm on tag
233
+ python/nedb/ reference engine (pure Python always-works baseline)
234
+ rust/
235
+ nedb-core/ production Rust engine (shared by both runtimes)
236
+ nedb-py/ maturin PyO3 binding → PyPI native wheels
237
+ nedb-node/ napi-rs binding npm native addons
238
+ tests/ engine + concurrent + causal + bitemporal + deploy tests
239
+ examples/ resp2_python.py resp2_demo.sh
203
240
  ```
204
241
 
242
+ ---
243
+
205
244
  ## Roadmap
206
245
 
207
- - [x] Reference engine: log, MVCC, relations, indexes, NQL, Cascade, Merkle
208
- - [x] Durable persistence: append-only log (AOF) on disk + replay-on-open; `verify()` / `AS OF` survive restarts
209
- - [ ] RDB-style snapshot checkpoint (fast load) that keeps the AOF chain intact
210
- - [ ] Rust core parity (persistence in `nedb._native`) + criterion benches + `cargo test`
211
- - [x] Universal pure-Python wheel + sdist on PyPI (installs everywhere; ships the `nedbd` command); napi-rs binaries on npm
212
- - [ ] Additive native PyO3 acceleration wheels for PyPI (optional speed; same API)
213
- - [x] `nedbd` server: HTTP/JSON daemon — durable, multi-database; `pip install` ships the `nedbd` command
214
- - [ ] `nedbd`: RESP-compatible wire protocol + native protocol
215
- - [ ] Similarity-picked deltas + schema-aware columnar transforms
216
- - [ ] On-chain (ITC) root anchoring; WASM build
246
+ - [x] Hash-chained append-only log tamper evidence, replay protection, idempotency
247
+ - [x] MVCC time-travel `AS OF seq`
248
+ - [x] Bi-temporal `VALID AS OF "date"` (transaction time + valid time)
249
+ - [x] Causal Write Provenance `caused_by`, `evidence`, `confidence`, `TRACE`
250
+ - [x] Durable AOF persistence + snapshot checkpoints
251
+ - [x] Concurrent group-commit sequencer (nedbd, 15K writes/s under load)
252
+ - [x] AES-256-GCM at-rest encryption (TMK/DEK double-envelope)
253
+ - [x] SQL / Redis / MongoDB compatibility adapters
254
+ - [x] RESP2 wire protocol (redis-cli / redis-benchmark compatible)
255
+ - [x] Rust native core — napi-rs (npm) + maturin PyO3 (PyPI)
256
+ - [x] Self-healing chains (auto-repair structural gaps, detect real tampering)
257
+ - [ ] Merkle inclusion proofs — prove a document existed at a specific time to a third party
258
+ - [ ] Git-style branching — fork database state, experiment, merge or discard
259
+ - [ ] Agent Memory SDK — `Memory.remember()` / `Memory.recall()` / `Memory.trace()`
260
+ - [ ] Live query subscriptions (SSE) — push diffs when query results change
261
+
262
+ ---
217
263
 
218
264
  ## NEDB Studio
219
265
 
220
- The agentic, prompt-to-database GUI for NEDB natural language schema, NQL, seed data, and Python/Node snippets lives in its own repo: **[Eth-Interchained/nedb-studio](https://github.com/Eth-Interchained/nedb-studio)** (Portal-powered, GPLv3).
266
+ Prompt-to-database scaffolding GUI with schema graph, NQL console, time-travel slider, causal provenance panel, and MongoDB/SQL/Redis tabs. Deploy from a description, query live data, edit inline.
267
+
268
+ **[studio.interchained.org](https://studio.interchained.org)** · **[github.com/Eth-Interchained/nedb-studio](https://github.com/Eth-Interchained/nedb-studio)** (GPLv3)
269
+
270
+ ---
271
+
272
+ ## Repos
273
+
274
+ | Repo | Description |
275
+ |---|---|
276
+ | [Eth-Interchained/nedb](https://github.com/Eth-Interchained/nedb) | Canonical source — engine, Rust core, CI |
277
+ | [Eth-Interchained/nedb-studio](https://github.com/Eth-Interchained/nedb-studio) | Studio UI (GPLv3) |
278
+ | [aiassistsecure/nedb](https://github.com/aiassistsecure/nedb) | Production mirror |
279
+ | [aiassistsecure/nedb-studio](https://github.com/aiassistsecure/nedb-studio) | Production mirror — studio |
280
+
281
+ **Packages:** [PyPI nedb-engine](https://pypi.org/project/nedb-engine/) · [npm nedb-engine](https://www.npmjs.com/package/nedb-engine)
282
+
283
+ ---
221
284
 
222
285
  ## License
223
286
 
224
- Apache-2.0 · © INTERCHAINED, LLC — [interchained.org](https://interchained.org). Built with [AiAssist](https://aiassist.net).
287
+ See `LICENSE` file. · © INTERCHAINED, LLC — [interchained.org](https://interchained.org)
225
288
 
226
289
  ---
227
290
 
228
291
  ## Authors
229
292
 
230
- Built by **[Mark Allen Evans Jr.](https://interchained.org)** (INTERCHAINED, LLC) with **Claude Sonnet 4.6** on [Hyperagent](https://hyperagent.com/refer/J2G6TCD7).
293
+ Built by **[Mark Allen Evans Jr.](https://interchained.org)** (INTERCHAINED, LLC)
294
+ with **Claude Sonnet 4.6** on [Hyperagent](https://hyperagent.com/refer/J2G6TCD7).
231
295
 
232
296
  > *"Take one idea, turn it into an LP, then an app, then a system, then a platform, then infrastructure that is irreplaceable."*
233
297
 
234
- [![Built with Hyperagent](https://img.shields.io/badge/Built%20with-Hyperagent-6366f1?style=flat-square&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMiIgZmlsbD0id2hpdGUiLz48L3N2Zz4=)](https://hyperagent.com/refer/J2G6TCD7)
235
-
298
+ [![Built with Hyperagent](https://img.shields.io/badge/Built%20with-Hyperagent-6366f1?style=flat-square)](https://hyperagent.com/refer/J2G6TCD7)
299
+ [![AiAssist](https://img.shields.io/badge/Powered%20by-AiAssist-00d4ff?style=flat-square)](https://aiassist.net)
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,14 +1,15 @@
1
1
  {
2
2
  "name": "nedb-engine",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "NEDB — hash-chained, time-traveling, bi-temporal embedded database with Rust native core. SQL, Redis, MongoDB adapters. Causal Write Provenance. RESP2 wire protocol.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "files": ["index.js", "index.d.ts", "*.node", "README.md", "LICENSE"],
8
- "license": "Apache-2.0",
8
+ "license": "GPL-3.0-or-later",
9
+ "homepage": "https://github.com/aiassistsecure/nedb#readme",
9
10
  "repository": {
10
11
  "type": "git",
11
- "url": "git+https://github.com/Eth-Interchained/nedb.git"
12
+ "url": "git+https://github.com/aiassistsecure/nedb.git"
12
13
  },
13
14
  "keywords": [
14
15
  "database", "embedded", "mvcc", "time-travel", "bi-temporal", "causal-provenance",