@soulcraft/brainy 4.1.0 → 4.1.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.1.1](https://github.com/soulcraftlabs/brainy/compare/v4.1.0...v4.1.1) (2025-10-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### 🐛 Bug Fixes
|
|
9
|
+
|
|
10
|
+
* correct Node.js version references from 24 to 22 in comments and code ([22513ff](https://github.com/soulcraftlabs/brainy/commit/22513ffcb40cc6498898400ac5d1bae19c5d02ed))
|
|
11
|
+
|
|
5
12
|
## [4.1.0](https://github.com/soulcraftlabs/brainy/compare/v4.0.1...v4.1.0) (2025-10-20)
|
|
6
13
|
|
|
7
14
|
|
package/dist/utils/embedding.js
CHANGED
|
@@ -10,7 +10,7 @@ import { pipeline, env } from '@huggingface/transformers';
|
|
|
10
10
|
if (typeof process !== 'undefined' && process.env) {
|
|
11
11
|
process.env.ORT_DISABLE_MEMORY_ARENA = '1';
|
|
12
12
|
process.env.ORT_DISABLE_MEMORY_PATTERN = '1';
|
|
13
|
-
// Force single-threaded operation for maximum stability (Node.js
|
|
13
|
+
// Force single-threaded operation for maximum stability (Node.js 22 LTS)
|
|
14
14
|
process.env.ORT_INTRA_OP_NUM_THREADS = '1'; // Single thread for operators
|
|
15
15
|
process.env.ORT_INTER_OP_NUM_THREADS = '1'; // Single thread for sessions
|
|
16
16
|
process.env.ORT_NUM_THREADS = '1'; // Additional safety override
|
|
@@ -56,8 +56,8 @@ export async function areWorkerThreadsAvailable() {
|
|
|
56
56
|
export function areWorkerThreadsAvailableSync() {
|
|
57
57
|
if (!isNode())
|
|
58
58
|
return false;
|
|
59
|
-
// In Node.js
|
|
60
|
-
return parseInt(process.versions.node.split('.')[0]) >=
|
|
59
|
+
// In Node.js 22+, worker_threads is always available
|
|
60
|
+
return parseInt(process.versions.node.split('.')[0]) >= 22;
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* Determine if threading is available in the current environment
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility functions for executing functions in Worker Threads (Node.js) or Web Workers (Browser)
|
|
3
|
-
* This implementation leverages Node.js
|
|
3
|
+
* This implementation leverages Node.js 22's stable Worker Threads API for maximum reliability
|
|
4
4
|
*/
|
|
5
5
|
/**
|
|
6
6
|
* Execute a function in a separate thread
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Utility functions for executing functions in Worker Threads (Node.js) or Web Workers (Browser)
|
|
3
|
-
* This implementation leverages Node.js
|
|
3
|
+
* This implementation leverages Node.js 22's stable Worker Threads API for maximum reliability
|
|
4
4
|
*/
|
|
5
5
|
import { isBrowser, isNode } from './environment.js';
|
|
6
6
|
// Worker pool to reuse workers
|
|
@@ -64,7 +64,7 @@ export function executeInThread(fnString, args) {
|
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Execute a function in a Node.js Worker Thread
|
|
67
|
-
* Optimized for Node.js
|
|
67
|
+
* Optimized for Node.js 22 LTS with stable Worker Threads performance
|
|
68
68
|
*/
|
|
69
69
|
function executeInNodeWorker(fnString, args) {
|
|
70
70
|
return new Promise((resolve, reject) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.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",
|