docs: plugins are explicit opt-in — correct the README scale section and plugins config comment

A clean-room install smoke of the published GA pair caught the README telling
scale-up users the native provider is auto-detected. It is not, by design: the
loader (loadPlugins) does no auto-detection — undefined means no plugins, and
only an explicit plugins: ['@soulcraft/cor'] loads the native engine (loud
failure if it can't). The stale comment on the plugins config field in the
public types claimed auto-detection and is corrected to match the loader; one
phrase in the plugin-author guide likewise.
This commit is contained in:
David Snelling 2026-07-02 15:47:31 -07:00
parent 99d526d394
commit e420369850
4 changed files with 21 additions and 9 deletions

View file

@ -181,11 +181,14 @@ npm install @soulcraft/cor
```
```javascript
const brain = new Brainy({ storage: { type: 'filesystem', path: './data' } })
await brain.init() // Cor auto-detected — same code, native engines underneath
const brain = new Brainy({
plugins: ['@soulcraft/cor'], // explicit opt-in — brainy never auto-loads a package
storage: { type: 'filesystem', path: './data' }
})
await brain.init() // same code — native engines underneath
```
[`@soulcraft/cor`](https://www.npmjs.com/package/@soulcraft/cor) (Brainy 8.x ↔ Cor 3.x, version-matched) registers Rust implementations behind every provider seam: SIMD distance kernels, memory-mapped storage, a disk-native vector index that doesn't need your dataset in RAM, durable LSM field/graph indexes that serve cold opens instantly, and native aggregation. Recall@10 measured **0.99 / 0.96 / 0.96 at 1M / 10M / 100M vectors** in Cor's release gate.
Plugins are explicit: an engine swap is always visible in your config, and a listed plugin that fails to load fails **loud** — never a silent fallback to the JS engines. [`@soulcraft/cor`](https://www.npmjs.com/package/@soulcraft/cor) (Brainy 8.x ↔ Cor 3.x, version-matched) registers Rust implementations behind every provider seam: SIMD distance kernels, memory-mapped storage, a disk-native vector index that doesn't need your dataset in RAM, durable LSM field/graph indexes that serve cold opens instantly, and native aggregation. Recall@10 measured **0.99 / 0.96 / 0.96 at 1M / 10M / 100M vectors** in Cor's release gate.
Open core, commercial accelerator: Brainy is MIT and complete on its own; Cor is licensed and funds both.

View file

@ -10,6 +10,14 @@ Full auto-generated changelog: `CHANGELOG.md` · Releases: https://github.com/so
---
## v8.0.8 — 2026-07-02 (docs-only patch on the GA)
Corrects the README's scale-up section: the native provider is **not** auto-detected — plugins are
**explicit opt-in** (`new Brainy({ plugins: ['@soulcraft/cor'] })`; brainy never auto-imports a
package you didn't list, and a listed plugin that fails to load throws rather than silently falling
back to the JS engines). Also fixes the stale `plugins` config comment in the public types and one
phrase in the plugin-author guide. No code change.
## v8.0.7 — 2026-07-02 (GA, npm tag `latest`)
> **Why 8.0.7:** npm permanently retires unpublished version numbers, and `8.0.0``8.0.6` were

View file

@ -70,7 +70,7 @@ export default myPlugin
### 2. Package exports
Your package must export the plugin as the default export so brainy's auto-detection works:
Your package must export the plugin as the default export so brainy's plugin loader can resolve it:
```typescript
// index.ts

View file

@ -1804,11 +1804,12 @@ export interface BrainyConfig {
eagerEmbeddings?: boolean
// Plugin configuration
// Controls which plugins are loaded during init()
// - undefined (default): Auto-detect installed plugins (@soulcraft/cor, etc.)
// - false: No plugins — skip auto-detection entirely
// - []: No plugins — skip auto-detection entirely
// - ['@soulcraft/cor']: Load only specified plugins, no auto-detection
// Controls which plugins are loaded during init(). Plugins are explicit
// opt-in — brainy NEVER auto-imports a package that isn't listed here.
// - undefined (default): no plugins loaded (same as [] / false)
// - false / []: no plugins loaded
// - ['@soulcraft/cor']: load exactly these packages; a listed plugin that
// fails to load or is invalid THROWS (loud, never a silent JS fallback)
plugins?: string[] | false
// Logging configuration