@soulcraft/brainy 0.32.0 → 0.34.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.
@@ -2,6 +2,7 @@
2
2
  * Embedding functions for converting data to vectors
3
3
  */
4
4
  import { EmbeddingFunction, EmbeddingModel, Vector } from '../coreTypes.js';
5
+ import { ModelLoadOptions } from './robustModelLoader.js';
5
6
  /**
6
7
  * TensorFlow Universal Sentence Encoder embedding model
7
8
  * This model provides high-quality text embeddings using TensorFlow.js
@@ -10,6 +11,10 @@ import { EmbeddingFunction, EmbeddingModel, Vector } from '../coreTypes.js';
10
11
  * This implementation attempts to use GPU processing when available for better performance,
11
12
  * falling back to CPU processing for compatibility across all environments.
12
13
  */
14
+ export interface UniversalSentenceEncoderOptions extends ModelLoadOptions {
15
+ /** Whether to enable verbose logging */
16
+ verbose?: boolean;
17
+ }
13
18
  export declare class UniversalSentenceEncoder implements EmbeddingModel {
14
19
  private model;
15
20
  private initialized;
@@ -17,13 +22,12 @@ export declare class UniversalSentenceEncoder implements EmbeddingModel {
17
22
  private use;
18
23
  private backend;
19
24
  private verbose;
25
+ private robustLoader;
20
26
  /**
21
27
  * Create a new UniversalSentenceEncoder instance
22
- * @param options Configuration options
28
+ * @param options Configuration options including reliability settings
23
29
  */
24
- constructor(options?: {
25
- verbose?: boolean;
26
- });
30
+ constructor(options?: UniversalSentenceEncoderOptions);
27
31
  /**
28
32
  * Add polyfills and patches for TensorFlow.js compatibility
29
33
  * This addresses issues with TensorFlow.js across all server environments
@@ -44,13 +48,10 @@ export declare class UniversalSentenceEncoder implements EmbeddingModel {
44
48
  */
45
49
  private logger;
46
50
  /**
47
- * Load the Universal Sentence Encoder model with retry logic
48
- * This helps handle network failures and JSON parsing errors from TensorFlow Hub
49
- * @param loadFunction The function to load the model
50
- * @param maxRetries Maximum number of retry attempts
51
- * @param baseDelay Base delay in milliseconds for exponential backoff
51
+ * Load the Universal Sentence Encoder model with robust retry and fallback mechanisms
52
+ * @param loadFunction The function to load the model from TensorFlow Hub
52
53
  */
53
- private loadModelWithRetry;
54
+ private loadModelFromLocal;
54
55
  /**
55
56
  * Initialize the embedding model
56
57
  */
@@ -59,13 +60,6 @@ export declare class UniversalSentenceEncoder implements EmbeddingModel {
59
60
  * Embed text into a vector using Universal Sentence Encoder
60
61
  * @param data Text to embed
61
62
  */
62
- /**
63
- * Generate a deterministic vector from a string
64
- * This is used as a fallback when the Universal Sentence Encoder is not available
65
- * @param text Input text
66
- * @returns A 512-dimensional vector derived from the text
67
- */
68
- private generateFallbackVector;
69
63
  embed(data: string | string[]): Promise<Vector>;
70
64
  /**
71
65
  * Embed multiple texts into vectors using Universal Sentence Encoder
@@ -1 +1 @@
1
- {"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/utils/embedding.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAI3E;;;;;;;GAOG;AACH,qBAAa,wBAAyB,YAAW,cAAc;IAC7D,OAAO,CAAC,KAAK,CAAY;IACzB,OAAO,CAAC,WAAW,CAAQ;IAC3B,OAAO,CAAC,EAAE,CAAY;IACtB,OAAO,CAAC,GAAG,CAAY;IACvB,OAAO,CAAC,OAAO,CAAgB;IAC/B,OAAO,CAAC,OAAO,CAAgB;IAE/B;;;OAGG;gBACS,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAO;IAI/C;;;;;;;;OAQG;IACH,OAAO,CAAC,+BAA+B;IA4CvC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAczB;;;OAGG;IACH,OAAO,CAAC,MAAM;IAWd;;;;;;OAMG;YACW,kBAAkB;IAkIhC;;OAEG;IACU,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgKlC;;;OAGG;IACH;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IA0CjB,KAAK,CAAC,IAAI,E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CACzC,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,iBAAiB,CAEnB;AAED;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,EAAE,iBACR,CAAA;AAe/B,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAyC5C;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,GAClC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAE5C;AAED;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,cAV3B,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,EAAE,CAUmC,CAAA;AAE/E;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,cAAc,GACpB,iBAAiB,CAUnB"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Utility functions for tracking and managing field names in JSON documents
3
+ */
4
+ /**
5
+ * Extracts field names from a JSON document
6
+ * @param jsonObject The JSON object to extract field names from
7
+ * @param options Configuration options
8
+ * @returns An array of field paths (e.g., "user.name", "addresses[0].city")
9
+ */
10
+ export declare function extractFieldNamesFromJson(jsonObject: any, options?: {
11
+ maxDepth?: number;
12
+ currentDepth?: number;
13
+ currentPath?: string;
14
+ fieldNames?: Set<string>;
15
+ }): string[];
16
+ /**
17
+ * Maps field names to standard field names based on common patterns
18
+ * @param fieldName The field name to map
19
+ * @returns The standard field name if a match is found, or null if no match
20
+ */
21
+ export declare function mapToStandardField(fieldName: string): string | null;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fieldNameTracking.d.ts","sourceRoot":"","sources":["../../src/utils/fieldNameTracking.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,GAAG,EACf,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CACpB,GACL,MAAM,EAAE,CAkDV;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAsCnE"}
@@ -2,3 +2,5 @@ export * from './distance.js';
2
2
  export * from './embedding.js';
3
3
  export * from './workerUtils.js';
4
4
  export * from './statistics.js';
5
+ export * from './jsonProcessing.js';
6
+ export * from './fieldNameTracking.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,qBAAqB,CAAA;AACnC,cAAc,wBAAwB,CAAA"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Utility functions for processing JSON documents for vectorization and search
3
+ */
4
+ /**
5
+ * Extracts text from a JSON object for vectorization
6
+ * This function recursively processes the JSON object and extracts text from all fields
7
+ * It can also prioritize specific fields if provided
8
+ *
9
+ * @param jsonObject The JSON object to extract text from
10
+ * @param options Configuration options for text extraction
11
+ * @returns A string containing the extracted text
12
+ */
13
+ export declare function extractTextFromJson(jsonObject: any, options?: {
14
+ priorityFields?: string[];
15
+ excludeFields?: string[];
16
+ includeFieldNames?: boolean;
17
+ maxDepth?: number;
18
+ currentDepth?: number;
19
+ fieldPath?: string[];
20
+ }): string;
21
+ /**
22
+ * Prepares a JSON document for vectorization
23
+ * This function extracts text from the JSON document and formats it for optimal vectorization
24
+ *
25
+ * @param jsonDocument The JSON document to prepare
26
+ * @param options Configuration options for preparation
27
+ * @returns A string ready for vectorization
28
+ */
29
+ export declare function prepareJsonForVectorization(jsonDocument: any, options?: {
30
+ priorityFields?: string[];
31
+ excludeFields?: string[];
32
+ includeFieldNames?: boolean;
33
+ maxDepth?: number;
34
+ }): string;
35
+ /**
36
+ * Extracts text from a specific field in a JSON document
37
+ * This is useful for searching within specific fields
38
+ *
39
+ * @param jsonDocument The JSON document to extract from
40
+ * @param fieldPath The path to the field (e.g., "user.name" or "addresses[0].city")
41
+ * @returns The extracted text or empty string if field not found
42
+ */
43
+ export declare function extractFieldFromJson(jsonDocument: any, fieldPath: string): string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsonProcessing.d.ts","sourceRoot":"","sources":["../../src/utils/jsonProcessing.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,GAAG,EACf,OAAO,GAAE;IACP,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAChB,GACL,MAAM,CAsGR;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,GAAG,EACjB,OAAO,GAAE;IACP,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;CACb,GACL,MAAM,CAmBR;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,GAAG,EACjB,SAAS,EAAE,MAAM,GAChB,MAAM,CAkDR"}
@@ -0,0 +1,94 @@
1
+ /**
2
+ * Robust Model Loader - Enhanced model loading with retry mechanisms and fallbacks
3
+ *
4
+ * This module provides a more reliable way to load TensorFlow models with:
5
+ * - Exponential backoff retry mechanisms
6
+ * - Timeout handling
7
+ * - Multiple fallback strategies
8
+ * - Better error handling and logging
9
+ * - Optional local model bundling support
10
+ */
11
+ import { EmbeddingModel } from '../coreTypes.js';
12
+ export interface ModelLoadOptions {
13
+ /** Maximum number of retry attempts */
14
+ maxRetries?: number;
15
+ /** Initial retry delay in milliseconds */
16
+ initialRetryDelay?: number;
17
+ /** Maximum retry delay in milliseconds */
18
+ maxRetryDelay?: number;
19
+ /** Request timeout in milliseconds */
20
+ timeout?: number;
21
+ /** Whether to use exponential backoff */
22
+ useExponentialBackoff?: boolean;
23
+ /** Fallback model URLs to try if primary fails */
24
+ fallbackUrls?: string[];
25
+ /** Whether to enable verbose logging */
26
+ verbose?: boolean;
27
+ /** Whether to prefer local bundled model if available */
28
+ preferLocalModel?: boolean;
29
+ }
30
+ export interface RetryConfig {
31
+ attempt: number;
32
+ maxRetries: number;
33
+ delay: number;
34
+ error: Error;
35
+ }
36
+ export declare class RobustModelLoader {
37
+ private options;
38
+ private loadAttempts;
39
+ constructor(options?: ModelLoadOptions);
40
+ /**
41
+ * Load a model with robust retry and fallback mechanisms
42
+ */
43
+ loadModel(primaryLoadFunction: () => Promise<EmbeddingModel>, modelIdentifier?: string): Promise<EmbeddingModel>;
44
+ /**
45
+ * Load a model with retry logic and exponential backoff
46
+ */
47
+ private loadWithRetries;
48
+ /**
49
+ * Try to load a locally bundled model
50
+ */
51
+ private tryLoadLocalBundledModel;
52
+ /**
53
+ * Load model from a specific URL
54
+ */
55
+ private loadFromUrl;
56
+ /**
57
+ * Create a model wrapper that matches the Universal Sentence Encoder interface
58
+ */
59
+ private createModelWrapper;
60
+ /**
61
+ * Apply timeout to a promise
62
+ */
63
+ private withTimeout;
64
+ /**
65
+ * Calculate retry delay with exponential backoff
66
+ */
67
+ private calculateRetryDelay;
68
+ /**
69
+ * Sleep for specified milliseconds
70
+ */
71
+ private sleep;
72
+ /**
73
+ * Log message if verbose mode is enabled
74
+ */
75
+ private log;
76
+ /**
77
+ * Get loading statistics
78
+ */
79
+ getLoadingStats(): {
80
+ [key: string]: number;
81
+ };
82
+ /**
83
+ * Reset loading statistics
84
+ */
85
+ resetStats(): void;
86
+ }
87
+ /**
88
+ * Create a robust model loader with sensible defaults
89
+ */
90
+ export declare function createRobustModelLoader(options?: ModelLoadOptions): RobustModelLoader;
91
+ /**
92
+ * Utility function to create fallback URLs for Universal Sentence Encoder
93
+ */
94
+ export declare function getUniversalSentenceEncoderFallbacks(): string[];
@@ -0,0 +1 @@
1
+ {"version":3,"file":"robustModelLoader.d.ts","sourceRoot":"","sources":["../../src/utils/robustModelLoader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAMhD,MAAM,WAAW,gBAAgB;IAC/B,uCAAuC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,0CAA0C;IAC1C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,0CAA0C;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,wCAAwC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,KAAK,CAAA;CACb;AAED,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,YAAY,CAAiC;gBAEzC,OAAO,GAAE,gBAAqB;IAa1C;;OAEG;IACG,SAAS,CACb,mBAAmB,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,EAClD,eAAe,GAAE,MAAkB,GAClC,OAAO,CAAC,cAAc,CAAC;IAqD1B;;OAEG;YACW,eAAe;IA2C7B;;OAEG;YACW,wBAAwB;IAwEtC;;OAEG;YACW,WAAW;IAMzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;OAEG;YACW,WAAW;IAUzB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAiB3B;;OAEG;IACH,OAAO,CAAC,KAAK;IAIb;;OAEG;IACH,OAAO,CAAC,GAAG;IAMX;;OAEG;IACH,eAAe,IAAI;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAQ5C;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,iBAAiB,CAErF;AAED;;GAEG;AACH,wBAAgB,oCAAoC,IAAI,MAAM,EAAE,CAM/D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
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",
@@ -54,26 +54,7 @@
54
54
  "build:browser": "BUILD_TYPE=browser rollup -c rollup.config.js",
55
55
  "start": "node dist/unified.js",
56
56
  "demo": "npm run build && npm run build:browser && npx http-server -o /demo/index.html",
57
- "release": "standard-version",
58
- "release:patch": "standard-version --release-as patch",
59
- "release:minor": "standard-version --release-as minor",
60
- "release:major": "standard-version --release-as major",
61
- "release:dry-run": "standard-version --dry-run",
62
- "github-release": "node scripts/create-github-release.js",
63
- "changelog:check": "echo 'Changelog is now automatically generated from commit messages'",
64
- "lint": "eslint --ext .ts,.js src/",
65
- "lint:fix": "eslint --ext .ts,.js src/ --fix",
66
- "format": "prettier --write \"src/**/*.{ts,js}\"",
67
- "check:format": "prettier --check \"src/**/*.{ts,js}\"",
68
- "check:style": "node scripts/check-code-style.js",
69
57
  "prepare": "npm run build",
70
- "deploy": "npm run build && npm publish",
71
- "workflow": "node scripts/release-workflow.js",
72
- "workflow:patch": "node scripts/release-workflow.js patch",
73
- "workflow:minor": "node scripts/release-workflow.js minor",
74
- "workflow:major": "node scripts/release-workflow.js major",
75
- "workflow:dry-run": "npm run build && npm test && npm run release:dry-run",
76
- "dry-run": "npm pack --dry-run",
77
58
  "test": "vitest run",
78
59
  "test:watch": "vitest",
79
60
  "test:ui": "vitest --ui",
@@ -90,7 +71,26 @@
90
71
  "test:environments": "vitest run tests/multi-environment.test.ts",
91
72
  "test:specialized": "vitest run tests/specialized-scenarios.test.ts",
92
73
  "test:performance": "vitest run tests/performance.test.ts",
93
- "test:comprehensive": "npm run test:error-handling && npm run test:edge-cases && npm run test:storage && npm run test:environments && npm run test:specialized"
74
+ "test:comprehensive": "npm run test:error-handling && npm run test:edge-cases && npm run test:storage && npm run test:environments && npm run test:specialized",
75
+ "_release": "standard-version",
76
+ "_release:patch": "standard-version --release-as patch",
77
+ "_release:minor": "standard-version --release-as minor",
78
+ "_release:major": "standard-version --release-as major",
79
+ "_release:dry-run": "standard-version --dry-run",
80
+ "_github-release": "node scripts/create-github-release.js",
81
+ "_changelog:check": "echo 'Changelog is now automatically generated from commit messages'",
82
+ "_lint": "eslint --ext .ts,.js src/",
83
+ "_lint:fix": "eslint --ext .ts,.js src/ --fix",
84
+ "_format": "prettier --write \"src/**/*.{ts,js}\"",
85
+ "_check:format": "prettier --check \"src/**/*.{ts,js}\"",
86
+ "_check:style": "node scripts/check-code-style.js",
87
+ "_deploy": "npm run build && npm publish",
88
+ "_workflow": "node scripts/release-workflow.js",
89
+ "_workflow:patch": "node scripts/release-workflow.js patch",
90
+ "_workflow:minor": "node scripts/release-workflow.js minor",
91
+ "_workflow:major": "node scripts/release-workflow.js major",
92
+ "_workflow:dry-run": "npm run build && npm test && npm run _release:dry-run",
93
+ "_dry-run": "npm pack --dry-run"
94
94
  },
95
95
  "keywords": [
96
96
  "vector-database",