@soulcraft/brainy 3.7.1 → 3.8.0
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/dist/brainy.js +4 -4
- package/dist/types/brainy.types.d.ts +1 -1
- package/package.json +1 -1
package/dist/brainy.js
CHANGED
|
@@ -1399,7 +1399,7 @@ export class Brainy {
|
|
|
1399
1399
|
*/
|
|
1400
1400
|
async setupStorage() {
|
|
1401
1401
|
const storage = await createStorage({
|
|
1402
|
-
type: this.config.storage?.type || '
|
|
1402
|
+
type: this.config.storage?.type || 'auto',
|
|
1403
1403
|
...this.config.storage?.options
|
|
1404
1404
|
});
|
|
1405
1405
|
return storage;
|
|
@@ -1445,8 +1445,8 @@ export class Brainy {
|
|
|
1445
1445
|
*/
|
|
1446
1446
|
normalizeConfig(config) {
|
|
1447
1447
|
// Validate storage configuration
|
|
1448
|
-
if (config?.storage?.type && !['memory', 'filesystem', 'opfs', 'remote'].includes(config.storage.type)) {
|
|
1449
|
-
throw new Error(`Invalid storage type: ${config.storage.type}. Must be one of: memory, filesystem, opfs, remote`);
|
|
1448
|
+
if (config?.storage?.type && !['auto', 'memory', 'filesystem', 'opfs', 'remote', 's3', 'r2', 'gcs'].includes(config.storage.type)) {
|
|
1449
|
+
throw new Error(`Invalid storage type: ${config.storage.type}. Must be one of: auto, memory, filesystem, opfs, remote, s3, r2, gcs`);
|
|
1450
1450
|
}
|
|
1451
1451
|
// Validate model configuration
|
|
1452
1452
|
if (config?.model?.type && !['fast', 'accurate', 'custom'].includes(config.model.type)) {
|
|
@@ -1463,7 +1463,7 @@ export class Brainy {
|
|
|
1463
1463
|
throw new Error(`Invalid index efSearch: ${config.index.efSearch}. Must be between 1 and 1000`);
|
|
1464
1464
|
}
|
|
1465
1465
|
return {
|
|
1466
|
-
storage: config?.storage || { type: '
|
|
1466
|
+
storage: config?.storage || { type: 'auto' },
|
|
1467
1467
|
model: config?.model || { type: 'fast' },
|
|
1468
1468
|
index: config?.index || {},
|
|
1469
1469
|
cache: config?.cache ?? true,
|
|
@@ -251,7 +251,7 @@ export type AggregateMetric = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'stddev'
|
|
|
251
251
|
*/
|
|
252
252
|
export interface BrainyConfig {
|
|
253
253
|
storage?: {
|
|
254
|
-
type: 'memory' | 'filesystem' | 's3' | 'r2' | 'opfs';
|
|
254
|
+
type: 'auto' | 'memory' | 'filesystem' | 's3' | 'r2' | 'opfs' | 'gcs';
|
|
255
255
|
options?: any;
|
|
256
256
|
};
|
|
257
257
|
model?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/brainy",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.0",
|
|
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",
|