@soulcraft/brainy 3.47.1 → 3.49.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/api/UniversalImportAPI.d.ts +11 -1
- package/dist/api/UniversalImportAPI.js +93 -24
- package/dist/augmentations/storageAugmentations.js +4 -3
- package/dist/brainy.d.ts +5 -1
- package/dist/brainy.js +20 -0
- package/dist/data/expandedKeywordDictionary.d.ts +22 -0
- package/dist/data/expandedKeywordDictionary.js +171 -0
- package/dist/import/ImportCoordinator.d.ts +5 -1
- package/dist/import/ImportCoordinator.js +13 -1
- package/dist/importers/SmartImportOrchestrator.d.ts +1 -1
- package/dist/importers/SmartImportOrchestrator.js +65 -12
- package/dist/index.d.ts +7 -2
- package/dist/index.js +9 -1
- package/dist/neural/embeddedKeywordEmbeddings.d.ts +29 -0
- package/dist/neural/embeddedKeywordEmbeddings.js +412683 -0
- package/dist/query/semanticTypeInference.d.ts +217 -0
- package/dist/query/semanticTypeInference.js +341 -0
- package/dist/query/typeAwareQueryPlanner.d.ts +152 -0
- package/dist/query/typeAwareQueryPlanner.js +297 -0
- package/dist/query/typeInference.d.ts +158 -0
- package/dist/query/typeInference.js +760 -0
- package/dist/storage/adapters/r2Storage.d.ts +213 -0
- package/dist/storage/adapters/r2Storage.js +876 -0
- package/dist/storage/adapters/s3CompatibleStorage.d.ts +1 -1
- package/dist/storage/adapters/s3CompatibleStorage.js +0 -2
- package/dist/storage/storageFactory.d.ts +2 -1
- package/dist/storage/storageFactory.js +4 -5
- package/dist/triple/TripleIntelligenceSystem.d.ts +4 -0
- package/dist/triple/TripleIntelligenceSystem.js +33 -4
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -108,9 +108,17 @@ import { NounType, VerbType } from './types/graphTypes.js';
|
|
|
108
108
|
import { getNounTypes, getVerbTypes, getNounTypeMap, getVerbTypeMap } from './utils/typeUtils.js';
|
|
109
109
|
// Export BrainyTypes for complete type management
|
|
110
110
|
import { BrainyTypes, suggestType } from './utils/brainyTypes.js';
|
|
111
|
+
// Export Semantic Type Inference - THE ONE unified system (nouns + verbs)
|
|
112
|
+
import { inferTypes, inferNouns, inferVerbs, inferIntent, getSemanticTypeInference, SemanticTypeInference } from './query/semanticTypeInference.js';
|
|
111
113
|
export { NounType, VerbType, getNounTypes, getVerbTypes, getNounTypeMap, getVerbTypeMap,
|
|
112
114
|
// BrainyTypes - complete type management
|
|
113
|
-
BrainyTypes, suggestType
|
|
115
|
+
BrainyTypes, suggestType,
|
|
116
|
+
// Semantic Type Inference - Unified noun + verb inference
|
|
117
|
+
inferTypes, // Main function - returns all types (nouns + verbs)
|
|
118
|
+
inferNouns, // Convenience - noun types only
|
|
119
|
+
inferVerbs, // Convenience - verb types only
|
|
120
|
+
inferIntent, // Best for query understanding - returns {nouns, verbs}
|
|
121
|
+
getSemanticTypeInference, SemanticTypeInference };
|
|
114
122
|
// Export MCP (Model Control Protocol) components
|
|
115
123
|
import { BrainyMCPAdapter, MCPAugmentationToolset, BrainyMCPService } from './mcp/index.js'; // Import from mcp/index.js
|
|
116
124
|
import { MCPRequestType, MCP_VERSION } from './types/mcpTypes.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pre-computed Keyword Embeddings for Unified Semantic Type Inference
|
|
3
|
+
*
|
|
4
|
+
* Generated by: scripts/buildKeywordEmbeddings.ts
|
|
5
|
+
* Generated on: 2025-10-16T17:40:14.690Z
|
|
6
|
+
* Total keywords: 1050 (716 nouns + 334 verbs)
|
|
7
|
+
* Canonical: 919, Synonyms: 131
|
|
8
|
+
* Embedding dimension: 384
|
|
9
|
+
* Total size: 1.54MB
|
|
10
|
+
*
|
|
11
|
+
* This file contains pre-computed semantic embeddings for ALL type inference keywords.
|
|
12
|
+
* Supports unified noun + verb semantic inference via SemanticTypeInference.
|
|
13
|
+
* Used for O(log n) semantic matching via HNSW index.
|
|
14
|
+
*/
|
|
15
|
+
import { NounType, VerbType } from '../types/graphTypes.js';
|
|
16
|
+
import { Vector } from '../coreTypes.js';
|
|
17
|
+
export interface KeywordEmbedding {
|
|
18
|
+
keyword: string;
|
|
19
|
+
type: NounType | VerbType;
|
|
20
|
+
typeCategory: 'noun' | 'verb';
|
|
21
|
+
confidence: number;
|
|
22
|
+
isCanonical: boolean;
|
|
23
|
+
embedding: Vector;
|
|
24
|
+
}
|
|
25
|
+
export declare function getKeywordEmbeddings(): KeywordEmbedding[];
|
|
26
|
+
export declare function getKeywordCount(): number;
|
|
27
|
+
export declare function getNounKeywordCount(): number;
|
|
28
|
+
export declare function getVerbKeywordCount(): number;
|
|
29
|
+
export declare function getEmbeddingDimension(): number;
|