@soulcraft/brainy 3.20.2 → 3.20.4

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/bin/brainy-interactive.js +2 -2
  3. package/dist/brainy.d.ts +1 -1
  4. package/dist/mcp/brainyMCPAdapter.d.ts +1 -1
  5. package/dist/mcp/brainyMCPService.d.ts +1 -1
  6. package/dist/neural/embeddedPatterns.d.ts +1 -1
  7. package/dist/neural/embeddedPatterns.js +1 -1
  8. package/dist/shared/default-augmentations.d.ts +1 -1
  9. package/dist/storage/adapters/fileSystemStorage.js +30 -17
  10. package/dist/types/{brainyDataInterface.js → brainyInterface.js} +1 -1
  11. package/package.json +1 -1
  12. package/dist/augmentationFactory.d.ts +0 -86
  13. package/dist/augmentationFactory.js +0 -342
  14. package/dist/augmentationRegistry.d.ts +0 -38
  15. package/dist/augmentationRegistry.js +0 -54
  16. package/dist/augmentationRegistryLoader.d.ts +0 -146
  17. package/dist/augmentationRegistryLoader.js +0 -213
  18. package/dist/augmentations/KnowledgeAugmentation.d.ts +0 -40
  19. package/dist/augmentations/KnowledgeAugmentation.js +0 -251
  20. package/dist/augmentations/intelligentVerbScoring.d.ts +0 -158
  21. package/dist/augmentations/intelligentVerbScoring.js +0 -377
  22. package/dist/augmentations/marketplace/AugmentationMarketplace.d.ts +0 -168
  23. package/dist/augmentations/marketplace/AugmentationMarketplace.js +0 -329
  24. package/dist/augmentations/marketplace/cli.d.ts +0 -47
  25. package/dist/augmentations/marketplace/cli.js +0 -265
  26. package/dist/augmentations/memoryAugmentations.d.ts +0 -72
  27. package/dist/augmentations/memoryAugmentations.js +0 -280
  28. package/dist/augmentations/serverSearchAugmentations.d.ts +0 -190
  29. package/dist/augmentations/serverSearchAugmentations.js +0 -586
  30. package/dist/brainy-unified.d.ts +0 -106
  31. package/dist/brainy-unified.js +0 -327
  32. package/dist/brainyData.d.ts +0 -1832
  33. package/dist/brainyData.js +0 -6443
  34. package/dist/brainyDataV3.d.ts +0 -186
  35. package/dist/brainyDataV3.js +0 -337
  36. package/dist/config/distributedPresets-new.d.ts +0 -118
  37. package/dist/config/distributedPresets-new.js +0 -318
  38. package/dist/config/modelPrecisionManager.d.ts +0 -42
  39. package/dist/config/modelPrecisionManager.js +0 -98
  40. package/dist/connectors/interfaces/IConnector.d.ts +0 -143
  41. package/dist/connectors/interfaces/IConnector.js +0 -8
  42. package/dist/demo.d.ts +0 -106
  43. package/dist/demo.js +0 -201
  44. package/dist/embeddings/SingletonModelManager.d.ts +0 -95
  45. package/dist/embeddings/SingletonModelManager.js +0 -220
  46. package/dist/embeddings/lightweight-embedder.d.ts +0 -22
  47. package/dist/embeddings/lightweight-embedder.js +0 -128
  48. package/dist/embeddings/model-manager.d.ts +0 -39
  49. package/dist/embeddings/model-manager.js +0 -245
  50. package/dist/embeddings/universal-memory-manager.d.ts +0 -38
  51. package/dist/embeddings/universal-memory-manager.js +0 -166
  52. package/dist/embeddings/worker-embedding.d.ts +0 -7
  53. package/dist/embeddings/worker-embedding.js +0 -73
  54. package/dist/embeddings/worker-manager.d.ts +0 -28
  55. package/dist/embeddings/worker-manager.js +0 -162
  56. package/dist/examples/basicUsage.d.ts +0 -4
  57. package/dist/examples/basicUsage.js +0 -121
  58. package/dist/indices/fieldIndex.d.ts +0 -76
  59. package/dist/indices/fieldIndex.js +0 -357
  60. package/dist/mcp/brainyMCPBroadcast.d.ts +0 -82
  61. package/dist/mcp/brainyMCPBroadcast.js +0 -303
  62. package/dist/mcp/brainyMCPClient.d.ts +0 -92
  63. package/dist/mcp/brainyMCPClient.js +0 -258
  64. package/dist/scripts/precomputePatternEmbeddings.d.ts +0 -19
  65. package/dist/scripts/precomputePatternEmbeddings.js +0 -100
  66. package/dist/utils/cacheAutoConfig.d.ts +0 -63
  67. package/dist/utils/cacheAutoConfig.js +0 -261
  68. package/dist/utils/hybridModelManager.d.ts +0 -64
  69. package/dist/utils/hybridModelManager.js +0 -95
  70. package/dist/utils/statistics.d.ts +0 -28
  71. package/dist/utils/statistics.js +0 -25
  72. package/dist/vfs/ConceptSystem.d.ts +0 -203
  73. package/dist/vfs/ConceptSystem.js +0 -545
  74. package/dist/vfs/EntityManager.d.ts +0 -75
  75. package/dist/vfs/EntityManager.js +0 -216
  76. package/dist/vfs/EventRecorder.d.ts +0 -84
  77. package/dist/vfs/EventRecorder.js +0 -269
  78. package/dist/vfs/GitBridge.d.ts +0 -167
  79. package/dist/vfs/GitBridge.js +0 -537
  80. package/dist/vfs/KnowledgeAugmentation.d.ts +0 -104
  81. package/dist/vfs/KnowledgeAugmentation.js +0 -146
  82. package/dist/vfs/KnowledgeLayer.d.ts +0 -35
  83. package/dist/vfs/KnowledgeLayer.js +0 -443
  84. package/dist/vfs/PersistentEntitySystem.d.ts +0 -165
  85. package/dist/vfs/PersistentEntitySystem.js +0 -503
  86. package/dist/vfs/SemanticVersioning.d.ts +0 -105
  87. package/dist/vfs/SemanticVersioning.js +0 -309
  88. package/dist/vfs/VFSHealthCheck.d.ts +0 -78
  89. package/dist/vfs/VFSHealthCheck.js +0 -299
  90. /package/dist/types/{brainyDataInterface.d.ts → brainyInterface.d.ts} +0 -0
@@ -1,203 +0,0 @@
1
- /**
2
- * Universal Concept System for VFS
3
- *
4
- * Manages concepts that transcend files and exist independently
5
- * Ideas that can be linked to multiple manifestations across domains
6
- * PRODUCTION-READY: Real implementation using Brainy
7
- */
8
- import { Brainy } from '../brainy.js';
9
- import { EntityManager, ManagedEntity } from './EntityManager.js';
10
- /**
11
- * Universal concept that exists independently of files
12
- */
13
- export interface UniversalConcept extends ManagedEntity {
14
- id: string;
15
- name: string;
16
- description?: string;
17
- domain: string;
18
- category: string;
19
- keywords: string[];
20
- links: ConceptLink[];
21
- manifestations: ConceptManifestation[];
22
- strength: number;
23
- created: number;
24
- lastUpdated: number;
25
- version: number;
26
- metadata: Record<string, any>;
27
- conceptType?: string;
28
- }
29
- /**
30
- * A link between concepts
31
- */
32
- export interface ConceptLink {
33
- id: string;
34
- targetConceptId: string;
35
- relationship: 'extends' | 'implements' | 'uses' | 'opposite' | 'related' | 'contains' | 'part-of';
36
- strength: number;
37
- context?: string;
38
- bidirectional: boolean;
39
- }
40
- /**
41
- * A manifestation of a concept in a specific location
42
- */
43
- export interface ConceptManifestation extends ManagedEntity {
44
- id: string;
45
- conceptId: string;
46
- filePath: string;
47
- context: string;
48
- form: 'definition' | 'usage' | 'example' | 'discussion' | 'implementation';
49
- position?: {
50
- line?: number;
51
- column?: number;
52
- offset?: number;
53
- };
54
- confidence: number;
55
- timestamp: number;
56
- extractedBy: 'manual' | 'auto' | 'ai';
57
- }
58
- /**
59
- * Configuration for concept system
60
- */
61
- export interface ConceptSystemConfig {
62
- autoLink?: boolean;
63
- similarityThreshold?: number;
64
- maxManifestations?: number;
65
- strengthDecay?: number;
66
- }
67
- /**
68
- * Concept graph structure for visualization
69
- */
70
- export interface ConceptGraph {
71
- concepts: Array<{
72
- id: string;
73
- name: string;
74
- domain: string;
75
- strength: number;
76
- manifestationCount: number;
77
- }>;
78
- links: Array<{
79
- source: string;
80
- target: string;
81
- relationship: string;
82
- strength: number;
83
- }>;
84
- }
85
- /**
86
- * Universal Concept System
87
- *
88
- * Manages concepts that exist independently of any specific file or context
89
- * Examples:
90
- * - "Authentication" concept appearing in docs, code, tests
91
- * - "Customer Journey" concept in marketing, UX, analytics
92
- * - "Dependency Injection" pattern across multiple codebases
93
- * - "Sustainability" theme in various research papers
94
- */
95
- export declare class ConceptSystem extends EntityManager {
96
- private config;
97
- private conceptCache;
98
- constructor(brain: Brainy, config?: ConceptSystemConfig);
99
- /**
100
- * Create a new universal concept
101
- */
102
- createConcept(concept: Omit<UniversalConcept, 'id' | 'created' | 'lastUpdated' | 'version' | 'links' | 'manifestations'>): Promise<string>;
103
- /**
104
- * Find concepts by various criteria
105
- */
106
- findConcepts(query: {
107
- name?: string;
108
- domain?: string;
109
- category?: string;
110
- keywords?: string[];
111
- similar?: string;
112
- manifestedIn?: string;
113
- }): Promise<UniversalConcept[]>;
114
- /**
115
- * Link two concepts together
116
- */
117
- linkConcept(fromConceptId: string, toConceptId: string, relationship: ConceptLink['relationship'], options?: {
118
- strength?: number;
119
- context?: string;
120
- bidirectional?: boolean;
121
- }): Promise<string>;
122
- /**
123
- * Record a manifestation of a concept in a file
124
- */
125
- recordManifestation(conceptId: string, filePath: string, context: string, form: ConceptManifestation['form'], options?: {
126
- position?: ConceptManifestation['position'];
127
- confidence?: number;
128
- extractedBy?: ConceptManifestation['extractedBy'];
129
- }): Promise<string>;
130
- /**
131
- * Extract and link concepts from content
132
- */
133
- extractAndLinkConcepts(filePath: string, content: Buffer): Promise<string[]>;
134
- /**
135
- * Get concept graph for visualization
136
- */
137
- getConceptGraph(options?: {
138
- domain?: string;
139
- minStrength?: number;
140
- maxConcepts?: number;
141
- }): Promise<ConceptGraph>;
142
- /**
143
- * Find appearances of a concept
144
- */
145
- findAppearances(conceptId: string, options?: {
146
- filePath?: string;
147
- form?: ConceptManifestation['form'];
148
- minConfidence?: number;
149
- limit?: number;
150
- }): Promise<ConceptManifestation[]>;
151
- /**
152
- * Auto-link concept to similar concepts
153
- */
154
- private autoLinkConcept;
155
- /**
156
- * Get concept by ID
157
- */
158
- private getConcept;
159
- /**
160
- * Update stored concept
161
- */
162
- private updateConcept;
163
- /**
164
- * Calculate similarity between two concepts
165
- */
166
- private calculateConceptSimilarity;
167
- /**
168
- * Generate embedding for concept
169
- */
170
- private generateConceptEmbedding;
171
- /**
172
- * Generate embedding for text
173
- */
174
- private generateTextEmbedding;
175
- /**
176
- * Get reverse relationship type
177
- */
178
- private getReverseRelationship;
179
- /**
180
- * Map concept relationship to VerbType
181
- */
182
- private getVerbType;
183
- /**
184
- * Detect concept domain from context
185
- */
186
- private detectDomain;
187
- /**
188
- * Detect concept category
189
- */
190
- private detectCategory;
191
- /**
192
- * Detect manifestation form from context
193
- */
194
- private detectManifestationForm;
195
- /**
196
- * Extract context around a position
197
- */
198
- private extractContext;
199
- /**
200
- * Clear concept cache
201
- */
202
- clearCache(conceptId?: string): void;
203
- }