@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,104 +0,0 @@
1
- /**
2
- * Knowledge Augmentation
3
- *
4
- * Main orchestrator for the Knowledge Layer that coordinates all knowledge systems
5
- * and enhances the VFS with intelligent capabilities
6
- */
7
- import { Brainy } from '../brainy.js';
8
- import { VirtualFileSystem } from './VirtualFileSystem.js';
9
- import { EventRecorder } from './EventRecorder.js';
10
- import { SemanticVersioning } from './SemanticVersioning.js';
11
- import { PersistentEntitySystem } from './PersistentEntitySystem.js';
12
- import { ConceptSystem } from './ConceptSystem.js';
13
- import { GitBridge } from './GitBridge.js';
14
- export interface KnowledgeAugmentationConfig {
15
- enabled: boolean;
16
- eventRecording?: {
17
- enabled: boolean;
18
- maxEvents?: number;
19
- };
20
- semanticVersioning?: {
21
- enabled: boolean;
22
- maxVersions?: number;
23
- };
24
- entitySystem?: {
25
- enabled: boolean;
26
- autoExtract?: boolean;
27
- };
28
- conceptSystem?: {
29
- enabled: boolean;
30
- autoExtract?: boolean;
31
- };
32
- gitBridge?: {
33
- enabled: boolean;
34
- autoSync?: boolean;
35
- };
36
- }
37
- export declare class KnowledgeAugmentation {
38
- private brain;
39
- private vfs;
40
- private config;
41
- private eventRecorder?;
42
- private semanticVersioning?;
43
- private entitySystem?;
44
- private conceptSystem?;
45
- private gitBridge?;
46
- private enabled;
47
- constructor(config: KnowledgeAugmentationConfig);
48
- /**
49
- * Initialize the Knowledge Augmentation with Brainy instance
50
- */
51
- init(brain: Brainy, vfs: VirtualFileSystem): Promise<void>;
52
- /**
53
- * Enable the Knowledge Augmentation
54
- */
55
- enable(): Promise<void>;
56
- /**
57
- * Disable the Knowledge Augmentation
58
- */
59
- disable(): Promise<void>;
60
- /**
61
- * Check if the knowledge augmentation is enabled
62
- */
63
- isEnabled(): boolean;
64
- /**
65
- * Get the EventRecorder instance
66
- */
67
- getEventRecorder(): EventRecorder | undefined;
68
- /**
69
- * Get the SemanticVersioning instance
70
- */
71
- getSemanticVersioning(): SemanticVersioning | undefined;
72
- /**
73
- * Get the PersistentEntitySystem instance
74
- */
75
- getEntitySystem(): PersistentEntitySystem | undefined;
76
- /**
77
- * Get the ConceptSystem instance
78
- */
79
- getConceptSystem(): ConceptSystem | undefined;
80
- /**
81
- * Get the GitBridge instance
82
- */
83
- getGitBridge(): GitBridge | undefined;
84
- /**
85
- * Record a file event (called by VFS)
86
- */
87
- recordEvent(type: string, path: string, metadata?: any): Promise<void>;
88
- /**
89
- * Create a semantic version (called by VFS)
90
- */
91
- createVersion(path: string, content: Buffer): Promise<void>;
92
- /**
93
- * Extract entities from content (called by VFS)
94
- */
95
- extractEntities(path: string, content: string): Promise<void>;
96
- /**
97
- * Extract concepts from content (called by VFS)
98
- */
99
- extractConcepts(path: string, content: string): Promise<void>;
100
- /**
101
- * Enhance the VFS with knowledge methods
102
- */
103
- private enhanceVFS;
104
- }
@@ -1,146 +0,0 @@
1
- /**
2
- * Knowledge Augmentation
3
- *
4
- * Main orchestrator for the Knowledge Layer that coordinates all knowledge systems
5
- * and enhances the VFS with intelligent capabilities
6
- */
7
- import crypto from 'crypto';
8
- import { EventRecorder } from './EventRecorder.js';
9
- import { SemanticVersioning } from './SemanticVersioning.js';
10
- import { PersistentEntitySystem } from './PersistentEntitySystem.js';
11
- import { ConceptSystem } from './ConceptSystem.js';
12
- import { GitBridge } from './GitBridge.js';
13
- export class KnowledgeAugmentation {
14
- constructor(config) {
15
- this.enabled = false;
16
- this.config = config;
17
- }
18
- /**
19
- * Initialize the Knowledge Augmentation with Brainy instance
20
- */
21
- async init(brain, vfs) {
22
- this.brain = brain;
23
- this.vfs = vfs;
24
- if (!this.config.enabled) {
25
- return;
26
- }
27
- // Initialize sub-systems
28
- if (this.config.eventRecording?.enabled) {
29
- this.eventRecorder = new EventRecorder(this.brain);
30
- }
31
- if (this.config.semanticVersioning?.enabled !== false) {
32
- this.semanticVersioning = new SemanticVersioning(this.brain);
33
- }
34
- if (this.config.entitySystem?.enabled !== false) {
35
- this.entitySystem = new PersistentEntitySystem(this.brain);
36
- }
37
- if (this.config.conceptSystem?.enabled !== false) {
38
- this.conceptSystem = new ConceptSystem(this.brain);
39
- }
40
- if (this.config.gitBridge?.enabled !== false) {
41
- this.gitBridge = new GitBridge(this.brain, this.vfs);
42
- }
43
- this.enabled = true;
44
- }
45
- /**
46
- * Enable the Knowledge Augmentation
47
- */
48
- async enable() {
49
- if (!this.brain || !this.vfs) {
50
- throw new Error('Knowledge augmentation not initialized. Call init() first.');
51
- }
52
- this.enabled = true;
53
- // Enhance VFS with knowledge methods
54
- this.enhanceVFS();
55
- }
56
- /**
57
- * Disable the Knowledge Augmentation
58
- */
59
- async disable() {
60
- this.enabled = false;
61
- // Remove VFS enhancements if any were added
62
- // For now, just mark as disabled
63
- }
64
- /**
65
- * Check if the knowledge augmentation is enabled
66
- */
67
- isEnabled() {
68
- return this.enabled;
69
- }
70
- /**
71
- * Get the EventRecorder instance
72
- */
73
- getEventRecorder() {
74
- return this.eventRecorder;
75
- }
76
- /**
77
- * Get the SemanticVersioning instance
78
- */
79
- getSemanticVersioning() {
80
- return this.semanticVersioning;
81
- }
82
- /**
83
- * Get the PersistentEntitySystem instance
84
- */
85
- getEntitySystem() {
86
- return this.entitySystem;
87
- }
88
- /**
89
- * Get the ConceptSystem instance
90
- */
91
- getConceptSystem() {
92
- return this.conceptSystem;
93
- }
94
- /**
95
- * Get the GitBridge instance
96
- */
97
- getGitBridge() {
98
- return this.gitBridge;
99
- }
100
- /**
101
- * Record a file event (called by VFS)
102
- */
103
- async recordEvent(type, path, metadata) {
104
- if (!this.enabled || !this.eventRecorder)
105
- return;
106
- await this.eventRecorder.recordEvent({
107
- id: crypto.randomUUID(),
108
- timestamp: Date.now(),
109
- type,
110
- path,
111
- metadata
112
- });
113
- }
114
- /**
115
- * Create a semantic version (called by VFS)
116
- */
117
- async createVersion(path, content) {
118
- if (!this.enabled || !this.semanticVersioning)
119
- return;
120
- await this.semanticVersioning.createVersion(path, content);
121
- }
122
- /**
123
- * Extract entities from content (called by VFS)
124
- */
125
- async extractEntities(path, content) {
126
- if (!this.enabled || !this.entitySystem)
127
- return;
128
- await this.entitySystem.extractEntities(content, { sourcePath: path });
129
- }
130
- /**
131
- * Extract concepts from content (called by VFS)
132
- */
133
- async extractConcepts(path, content) {
134
- if (!this.enabled || !this.conceptSystem)
135
- return;
136
- await this.conceptSystem.extractConcepts(content, { sourcePath: path });
137
- }
138
- /**
139
- * Enhance the VFS with knowledge methods
140
- */
141
- enhanceVFS() {
142
- // For now, the VFS calls the knowledge methods directly
143
- // In the future, we could add methods to the VFS prototype
144
- }
145
- }
146
- //# sourceMappingURL=KnowledgeAugmentation.js.map
@@ -1,35 +0,0 @@
1
- /**
2
- * Knowledge Layer for VFS
3
- *
4
- * This is the REAL integration that makes VFS intelligent.
5
- * It wraps VFS operations and adds Knowledge Layer processing.
6
- */
7
- import { VirtualFileSystem } from './VirtualFileSystem.js';
8
- import { Brainy } from '../brainy.js';
9
- export declare class KnowledgeLayer {
10
- private vfs;
11
- private brain;
12
- private eventRecorder;
13
- private semanticVersioning;
14
- private entitySystem;
15
- private conceptSystem;
16
- private gitBridge;
17
- private enabled;
18
- constructor(vfs: VirtualFileSystem, brain: Brainy);
19
- /**
20
- * Enable Knowledge Layer by wrapping VFS methods
21
- */
22
- enable(): Promise<void>;
23
- /**
24
- * Add Knowledge Layer query methods to VFS
25
- */
26
- private addKnowledgeMethods;
27
- /**
28
- * Disable Knowledge Layer
29
- */
30
- disable(): Promise<void>;
31
- }
32
- /**
33
- * Enable Knowledge Layer on a VFS instance
34
- */
35
- export declare function enableKnowledgeLayer(vfs: VirtualFileSystem, brain: Brainy): Promise<KnowledgeLayer>;