@soulcraft/cor 3.0.1 → 3.0.3

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
@@ -24,6 +24,7 @@
24
24
  <a href="#feature-tour">Features</a> ·
25
25
  <a href="#one-box-hundreds-of-brains--or-one-brain-at-billion-scale">Scale</a> ·
26
26
  <a href="#measured-not-promised">Benchmarks</a> ·
27
+ <a href="#licensing-that-never-breaks-your-app">Licensing</a> ·
27
28
  <a href="#learn-more">Docs</a>
28
29
  </p>
29
30
 
@@ -74,14 +75,15 @@ const hits = await brain.find({
74
75
  }) // one call, three indexes, fused
75
76
  ```
76
77
 
77
- **Activate** (paid tiers; free = just use brainy):
78
+ **Get a license & activate** under 1M entities, skip this: brainy alone is free and genuinely enough. Beyond that, pick a tier at **[soulcraft.com/pricing](https://soulcraft.com/pricing?focus=cor)** (pricing follows the size of your brain — from $49/mo), then:
78
79
 
79
80
  ```bash
80
- npx @soulcraft/cor login # browser sign-in, like `gh auth login`
81
+ npx @soulcraft/cor login # browser sign-in, like `gh auth login`
82
+ # walks you through checkout too if you don't have a key yet
81
83
  # or, for servers / CI: export COR_LICENSE_KEY=sc_cor_...
82
84
  ```
83
85
 
84
- Keys verify **offline** in Rust — no network call at startup, no license server to run.
86
+ Keys verify **offline** in Rust — no network call at startup, no license server to run. And a missing or expired key never breaks anything: cor steps aside and you're on open-source brainy, same files.
85
87
 
86
88
  ## Exact filters inside the vector walk
87
89
 
@@ -931,6 +931,12 @@ export class GraphAdjacencyIndex {
931
931
  this.flushTimer = setInterval(async () => {
932
932
  await this.flush();
933
933
  }, this.config.flushInterval);
934
+ // Never keep a bare process alive for housekeeping: durability rides the
935
+ // mmap'd LSM log at write time — this timer only paces background flushes.
936
+ // Without unref, any script that exits without reaching close() hangs
937
+ // forever. Same pattern as the cache + resource-manager timers.
938
+ if (this.flushTimer.unref)
939
+ this.flushTimer.unref();
934
940
  }
935
941
  calculateMemoryUsage() {
936
942
  const stats = this.native.getStats();
@@ -80,7 +80,7 @@ This means semantic time travel is a **brainy feature** that cor accelerates —
80
80
  **Guarantee (verified, 8.0.0-rc.2 + cor 3.0):** `db.asOf(g).find({ vector, where })` is set-correct, rank-correct (at-g embedding), and filter-correct (at-g metadata) — **for mutations committed via `brain.transact([...])`**.
81
81
 
82
82
  **Limits — all four are real; do not claim past them:**
83
- 1. **`transact()`-only in the shipped brainy rc.2.** Single-op `brain.add()`/`brain.remove()` writes bump the generation counter but do **not** retain a before-image or register the generation (`generationStore.js:178 noteSingleOpWrite`), so `asOf(g)` silently resolves to **current** state for them. Time-travel-correct history requires `transact()`. Brainy's rc.3 Model-B is slated to retain single-op writes; the guard test (`semanticAsOf.test.ts`) flips red when it lands. (Handoff: IMMUTABILITY-TIMETRAVEL thread.)
83
+ 1. ~~**`transact()`-only.**~~ **RESOLVED before GA** brainy's Model-B landed in 8.0.0-rc.3 (`5c3bb2c`): single-op `add()`/`remove()` writes ARE retained (per-write `persistSingleOp`/`commitSingleOp` generation-stamping), so `asOf(g)` is history-correct for BOTH `transact([...])` and single-op mutations. Regression-pinned in `src/native/semanticAsOf.test.ts` (runs green in the release gate vs the published 8.0.11). The rc.2-era gap this bullet used to describe no longer exists in any shipped 8.x.
84
84
  2. **The historical leg is brainy-JS-served this release.** `asOf(g)` builds an ephemeral reader brain and rebuilds a JS HNSW from the at-g vectors; cor's native vector index (`NativeDiskAnnWrapper`) is **not** on the historical path. cor accelerates only the live (`now`) leg in 3.0. (Open-core: brainy-alone is correct via JS rerank.)
85
85
  3. **O(n-at-g) rebuild per `asOf` Db — small/medium scale only.** One `addItem` per at-g vector into a fresh JS HNSW; this OOMs at billion-scale. Billion-scale historical semantic find is **Phase 1–2** (cor native rerank / overlay / tiered ANN; #35). Phase 0 is correctness, not scale.
86
86
  4. **No embedding-model-drift guard yet.** Comparing a query embedded with model vN against stored vectors from model vM is silently wrong across a model upgrade — detection lands in Phase 1, alignment in Phase 3.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/cor",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "description": "Native Rust acceleration for Brainy \u2014 SIMD distance, vector quantization, zero-copy mmap, native embeddings. Free tier for storage, Pro license for compute acceleration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@napi-rs/cli": "^3.0.0",
85
- "@soulcraft/brainy": "8.0.7",
85
+ "@soulcraft/brainy": "8.0.11",
86
86
  "@types/node": "^22.0.0",
87
87
  "pg": "^8.21.0",
88
88
  "tsx": "^4.21.0",