@soulcraft/brainy 3.9.0 → 3.9.1
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 +26 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](LICENSE)
|
|
10
10
|
[](https://www.typescriptlang.org/)
|
|
11
11
|
|
|
12
|
-
**🧠 Brainy
|
|
12
|
+
**🧠 Brainy - Universal Knowledge Protocol™**
|
|
13
13
|
|
|
14
14
|
**World's first Triple Intelligence™ database** unifying vector similarity, graph relationships, and document filtering in one magical API. **Framework-friendly design** works seamlessly with Next.js, React, Vue, Angular, and any modern JavaScript framework.
|
|
15
15
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
**Framework-first design.** Built for modern web development with zero configuration and automatic framework compatibility. O(log n) performance, <10ms search latency, production-ready.
|
|
19
19
|
|
|
20
|
-
## 🎉
|
|
20
|
+
## 🎉 Key Features
|
|
21
21
|
|
|
22
22
|
### 🧠 **Triple Intelligence™ Engine**
|
|
23
23
|
|
|
@@ -49,7 +49,7 @@ npm install @soulcraft/brainy
|
|
|
49
49
|
### 🎯 **True Zero Configuration**
|
|
50
50
|
|
|
51
51
|
```javascript
|
|
52
|
-
import {Brainy} from '@soulcraft/brainy'
|
|
52
|
+
import { Brainy, NounType } from '@soulcraft/brainy'
|
|
53
53
|
|
|
54
54
|
// Just this - auto-detects everything!
|
|
55
55
|
const brain = new Brainy()
|
|
@@ -58,7 +58,7 @@ await brain.init()
|
|
|
58
58
|
// Add entities with automatic embedding
|
|
59
59
|
const jsId = await brain.add({
|
|
60
60
|
data: "JavaScript is a programming language",
|
|
61
|
-
|
|
61
|
+
nounType: NounType.Concept,
|
|
62
62
|
metadata: {
|
|
63
63
|
type: "language",
|
|
64
64
|
year: 1995,
|
|
@@ -68,7 +68,7 @@ const jsId = await brain.add({
|
|
|
68
68
|
|
|
69
69
|
const nodeId = await brain.add({
|
|
70
70
|
data: "Node.js runtime environment",
|
|
71
|
-
|
|
71
|
+
nounType: NounType.Concept,
|
|
72
72
|
metadata: {
|
|
73
73
|
type: "runtime",
|
|
74
74
|
year: 2009,
|
|
@@ -100,7 +100,7 @@ const filtered = await brain.find({
|
|
|
100
100
|
|
|
101
101
|
## 🌐 Framework Integration
|
|
102
102
|
|
|
103
|
-
**Brainy
|
|
103
|
+
**Brainy is framework-first!** Works seamlessly with any modern JavaScript framework:
|
|
104
104
|
|
|
105
105
|
### ⚛️ **React & Next.js**
|
|
106
106
|
```javascript
|
|
@@ -194,7 +194,7 @@ If using nvm: `nvm use` (we provide a `.nvmrc` file)
|
|
|
194
194
|
|
|
195
195
|
**Enabled by Triple Intelligence, standardized for everyone:**
|
|
196
196
|
|
|
197
|
-
- **
|
|
197
|
+
- **31 Noun Types × 40 Verb Types**: 1,240 base combinations
|
|
198
198
|
- **∞ Expressiveness**: Unlimited metadata = model ANY data
|
|
199
199
|
- **One Language**: All tools, augmentations, AI models speak the same types
|
|
200
200
|
- **Perfect Interoperability**: Move data between any Brainy instance
|
|
@@ -211,10 +211,10 @@ await brain.find("Documentation about authentication from last month")
|
|
|
211
211
|
|
|
212
212
|
### 🎯 Zero Configuration Philosophy
|
|
213
213
|
|
|
214
|
-
Brainy
|
|
214
|
+
Brainy automatically configures **everything**:
|
|
215
215
|
|
|
216
216
|
```javascript
|
|
217
|
-
import {Brainy} from '@soulcraft/brainy'
|
|
217
|
+
import { Brainy } from '@soulcraft/brainy'
|
|
218
218
|
|
|
219
219
|
// 1. Pure zero-config - detects everything
|
|
220
220
|
const brain = new Brainy()
|
|
@@ -368,6 +368,8 @@ const brain = new Brainy({
|
|
|
368
368
|
### Real-World Example: Social Media Firehose
|
|
369
369
|
|
|
370
370
|
```javascript
|
|
371
|
+
import { Brainy, NounType } from '@soulcraft/brainy'
|
|
372
|
+
|
|
371
373
|
// Ingestion nodes (optimized for writes)
|
|
372
374
|
const ingestionNode = new Brainy({
|
|
373
375
|
storage: {type: 's3', options: {bucket: 'social-data'}},
|
|
@@ -378,7 +380,7 @@ const ingestionNode = new Brainy({
|
|
|
378
380
|
// Process Bluesky firehose
|
|
379
381
|
blueskyStream.on('post', async (post) => {
|
|
380
382
|
await ingestionNode.add(post, {
|
|
381
|
-
nounType:
|
|
383
|
+
nounType: NounType.Message,
|
|
382
384
|
platform: 'bluesky',
|
|
383
385
|
author: post.author,
|
|
384
386
|
timestamp: post.createdAt
|
|
@@ -417,21 +419,19 @@ const trending = await searchNode.find('trending AI topics', {
|
|
|
417
419
|
```javascript
|
|
418
420
|
// Store documentation with rich relationships
|
|
419
421
|
const apiGuide = await brain.add("REST API Guide", {
|
|
420
|
-
nounType:
|
|
422
|
+
nounType: NounType.Document,
|
|
421
423
|
title: "API Guide",
|
|
422
424
|
category: "documentation",
|
|
423
425
|
version: "2.0"
|
|
424
426
|
})
|
|
425
427
|
|
|
426
428
|
const author = await brain.add("Jane Developer", {
|
|
427
|
-
nounType:
|
|
428
|
-
type: "person",
|
|
429
|
+
nounType: NounType.Person,
|
|
429
430
|
role: "tech-lead"
|
|
430
431
|
})
|
|
431
432
|
|
|
432
433
|
const project = await brain.add("E-commerce Platform", {
|
|
433
|
-
nounType:
|
|
434
|
-
type: "project",
|
|
434
|
+
nounType: NounType.Project,
|
|
435
435
|
status: "active"
|
|
436
436
|
})
|
|
437
437
|
|
|
@@ -462,21 +462,18 @@ const similar = await brain.search(existingContent, {
|
|
|
462
462
|
```javascript
|
|
463
463
|
// Store conversation with relationships
|
|
464
464
|
const userId = await brain.add("User 123", {
|
|
465
|
-
nounType:
|
|
466
|
-
type: "user",
|
|
465
|
+
nounType: NounType.User,
|
|
467
466
|
tier: "premium"
|
|
468
467
|
})
|
|
469
468
|
|
|
470
469
|
const messageId = await brain.add(userMessage, {
|
|
471
|
-
nounType:
|
|
472
|
-
type: "message",
|
|
470
|
+
nounType: NounType.Message,
|
|
473
471
|
timestamp: Date.now(),
|
|
474
472
|
session: "abc"
|
|
475
473
|
})
|
|
476
474
|
|
|
477
475
|
const topicId = await brain.add("Product Support", {
|
|
478
|
-
nounType:
|
|
479
|
-
type: "topic",
|
|
476
|
+
nounType: NounType.Topic,
|
|
480
477
|
category: "support"
|
|
481
478
|
})
|
|
482
479
|
|
|
@@ -602,7 +599,7 @@ for (const cluster of feedbackClusters) {
|
|
|
602
599
|
}
|
|
603
600
|
|
|
604
601
|
// Find related documents
|
|
605
|
-
const docId = await brain.add("Machine learning guide", { nounType:
|
|
602
|
+
const docId = await brain.add("Machine learning guide", { nounType: NounType.Document })
|
|
606
603
|
const similar = await neural.neighbors(docId, 5)
|
|
607
604
|
// Returns 5 most similar documents
|
|
608
605
|
|
|
@@ -637,7 +634,7 @@ Brainy includes enterprise-grade capabilities at no extra cost. **No premium tie
|
|
|
637
634
|
- **Built-in monitoring** with metrics and health checks
|
|
638
635
|
- **Production ready** with circuit breakers and backpressure
|
|
639
636
|
|
|
640
|
-
📖 **
|
|
637
|
+
📖 **More enterprise features coming soon** - Stay tuned!
|
|
641
638
|
|
|
642
639
|
## 📊 Benchmarks
|
|
643
640
|
|
|
@@ -651,13 +648,14 @@ Brainy includes enterprise-grade capabilities at no extra cost. **No premium tie
|
|
|
651
648
|
| Bulk Import (1000 items) | 2.3s | +8MB |
|
|
652
649
|
| **Production Scale (10M items)** | **5.8ms** | **12GB** |
|
|
653
650
|
|
|
654
|
-
## 🔄 Migration from
|
|
651
|
+
## 🔄 Migration from Previous Versions
|
|
655
652
|
|
|
656
|
-
Key changes
|
|
653
|
+
Key changes in the latest version:
|
|
657
654
|
|
|
658
655
|
- Search methods consolidated into `search()` and `find()`
|
|
659
656
|
- Result format now includes full objects with metadata
|
|
660
|
-
-
|
|
657
|
+
- Enhanced natural language capabilities
|
|
658
|
+
- Distributed architecture support
|
|
661
659
|
|
|
662
660
|
## 🤝 Contributing
|
|
663
661
|
|
|
@@ -678,10 +676,10 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
678
676
|
### The Math of Infinite Expressiveness
|
|
679
677
|
|
|
680
678
|
```
|
|
681
|
-
|
|
679
|
+
31 Nouns × 40 Verbs × ∞ Metadata × Triple Intelligence = Universal Protocol
|
|
682
680
|
```
|
|
683
681
|
|
|
684
|
-
- **
|
|
682
|
+
- **1,240 base combinations** from standardized types
|
|
685
683
|
- **∞ domain specificity** via unlimited metadata
|
|
686
684
|
- **∞ relationship depth** via graph traversal
|
|
687
685
|
- **= Model ANYTHING**: From quantum physics to social networks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.1",
|
|
4
4
|
"description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. 31 nouns × 40 verbs for infinite expressiveness.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|