@soulcraft/brainy 0.9.17 → 0.9.20
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 +22 -10
- package/dist/utils/version.d.ts +1 -1
- package/package.json +1 -8
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
7
|
[](https://www.typescriptlang.org/)
|
|
8
8
|
[](CONTRIBUTING.md)
|
|
9
|
-
[](https://www.npmjs.com/package/@soulcraft/brainy)
|
|
10
10
|
|
|
11
11
|
[//]: # ([](https://github.com/sodal-project/cartographer))
|
|
12
12
|
|
|
@@ -115,7 +115,9 @@ import { BrainyData } from '@soulcraft/brainy/min'
|
|
|
115
115
|
import '@soulcraft/brainy/cli'
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
> **Note**: The CLI functionality (4MB) is not included in the standard import, reducing the bundle size for browser and
|
|
118
|
+
> **Note**: The CLI functionality (4MB) is not included in the standard import, reducing the bundle size for browser and
|
|
119
|
+
> Node.js applications. The CLI is only built and loaded when explicitly imported or when using the command-line
|
|
120
|
+
> interface.
|
|
119
121
|
|
|
120
122
|
### Browser Usage
|
|
121
123
|
|
|
@@ -424,7 +426,8 @@ Connections between nouns (edges in the graph):
|
|
|
424
426
|
|
|
425
427
|
## Command Line Interface
|
|
426
428
|
|
|
427
|
-
Brainy includes a powerful CLI for managing your data. The CLI is available as a separate package
|
|
429
|
+
Brainy includes a powerful CLI for managing your data. The CLI is available as a separate package
|
|
430
|
+
`@soulcraft/brainy-cli` to reduce the bundle size of the main package.
|
|
428
431
|
|
|
429
432
|
### Installing and Using the CLI
|
|
430
433
|
|
|
@@ -452,7 +455,8 @@ brainy visualize --root <id> --depth 3
|
|
|
452
455
|
|
|
453
456
|
### Publishing the CLI Package
|
|
454
457
|
|
|
455
|
-
If you need to publish the CLI package to npm, please refer to the [CLI Publishing Guide](docs/publishing-cli.md) for
|
|
458
|
+
If you need to publish the CLI package to npm, please refer to the [CLI Publishing Guide](docs/publishing-cli.md) for
|
|
459
|
+
detailed instructions.
|
|
456
460
|
|
|
457
461
|
### Using the CLI in Your Code
|
|
458
462
|
|
|
@@ -466,7 +470,8 @@ import '@soulcraft/brainy/cli'
|
|
|
466
470
|
// ...
|
|
467
471
|
```
|
|
468
472
|
|
|
469
|
-
This will only build and load the CLI when you explicitly import it, keeping your bundle size small when you don't need
|
|
473
|
+
This will only build and load the CLI when you explicitly import it, keeping your bundle size small when you don't need
|
|
474
|
+
the CLI.
|
|
470
475
|
|
|
471
476
|
### Development Usage
|
|
472
477
|
|
|
@@ -1302,17 +1307,24 @@ comprehensive [Scaling Strategy](scalingStrategy.md) document.
|
|
|
1302
1307
|
|
|
1303
1308
|
Brainy takes advantage of several optimizations available in Node.js 24:
|
|
1304
1309
|
|
|
1305
|
-
1. **Improved Worker Threads Performance**: The multithreading system has been completely rewritten to leverage Node.js
|
|
1310
|
+
1. **Improved Worker Threads Performance**: The multithreading system has been completely rewritten to leverage Node.js
|
|
1311
|
+
24's enhanced Worker Threads API, resulting in better performance for compute-intensive operations like embedding
|
|
1312
|
+
generation and vector similarity calculations.
|
|
1306
1313
|
|
|
1307
|
-
2. **Worker Pool Management**: A sophisticated worker pool system reuses worker threads to minimize the overhead of
|
|
1314
|
+
2. **Worker Pool Management**: A sophisticated worker pool system reuses worker threads to minimize the overhead of
|
|
1315
|
+
creating and destroying threads, leading to more efficient resource utilization.
|
|
1308
1316
|
|
|
1309
|
-
3. **Dynamic Module Imports**: Uses the new `node:` protocol prefix for importing core modules, which provides better
|
|
1317
|
+
3. **Dynamic Module Imports**: Uses the new `node:` protocol prefix for importing core modules, which provides better
|
|
1318
|
+
performance and more reliable module resolution.
|
|
1310
1319
|
|
|
1311
|
-
4. **ES Modules Optimizations**: Takes advantage of Node.js 24's improved ESM implementation for faster module loading
|
|
1320
|
+
4. **ES Modules Optimizations**: Takes advantage of Node.js 24's improved ESM implementation for faster module loading
|
|
1321
|
+
and execution.
|
|
1312
1322
|
|
|
1313
|
-
5. **Enhanced Error Handling**: Implements more robust error handling patterns available in Node.js 24 for better
|
|
1323
|
+
5. **Enhanced Error Handling**: Implements more robust error handling patterns available in Node.js 24 for better
|
|
1324
|
+
stability and debugging.
|
|
1314
1325
|
|
|
1315
1326
|
These optimizations are particularly beneficial for:
|
|
1327
|
+
|
|
1316
1328
|
- Large-scale vector operations
|
|
1317
1329
|
- Batch processing of embeddings
|
|
1318
1330
|
- Real-time data processing pipelines
|
package/dist/utils/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.20",
|
|
4
4
|
"description": "A vector graph database using HNSW indexing with Origin Private File System storage",
|
|
5
5
|
"main": "dist/unified.js",
|
|
6
6
|
"module": "dist/unified.js",
|
|
@@ -22,9 +22,6 @@
|
|
|
22
22
|
"./types/augmentations": {
|
|
23
23
|
"import": "./dist/types/augmentations.js",
|
|
24
24
|
"types": "./dist/types/augmentations.d.ts"
|
|
25
|
-
},
|
|
26
|
-
"./cli": {
|
|
27
|
-
"import": "./dist/cli.js"
|
|
28
25
|
}
|
|
29
26
|
},
|
|
30
27
|
"engines": {
|
|
@@ -34,7 +31,6 @@
|
|
|
34
31
|
"prebuild": "node scripts/generate-version.js",
|
|
35
32
|
"build": "BUILD_TYPE=unified rollup -c rollup.config.js",
|
|
36
33
|
"build:browser": "BUILD_TYPE=browser rollup -c rollup.config.js",
|
|
37
|
-
"build:cli": "BUILD_TYPE=cli rollup -c rollup.config.js",
|
|
38
34
|
"start": "node dist/unified.js",
|
|
39
35
|
"demo": "npm run build && npm run build:browser && npx http-server -o /index.html",
|
|
40
36
|
"version": "node scripts/generate-version.js",
|
|
@@ -94,7 +90,6 @@
|
|
|
94
90
|
"@rollup/plugin-replace": "^5.0.5",
|
|
95
91
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
96
92
|
"@types/node": "^20.4.5",
|
|
97
|
-
"@types/omelette": "^0.4.5",
|
|
98
93
|
"@types/uuid": "^10.0.0",
|
|
99
94
|
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
|
100
95
|
"@typescript-eslint/parser": "^6.0.0",
|
|
@@ -113,8 +108,6 @@
|
|
|
113
108
|
"@tensorflow/tfjs-converter": "^4.22.0",
|
|
114
109
|
"@tensorflow/tfjs-core": "^4.22.0",
|
|
115
110
|
"buffer": "^6.0.3",
|
|
116
|
-
"commander": "^14.0.0",
|
|
117
|
-
"omelette": "^0.4.17",
|
|
118
111
|
"uuid": "^9.0.0"
|
|
119
112
|
},
|
|
120
113
|
"prettier": {
|