@soulcraft/brainy 0.57.1 → 0.58.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/README.md +2 -0
- package/dist/brainyData.js +7 -2
- package/dist/brainyData.js.map +1 -1
- package/dist/coreTypes.d.ts +35 -0
- package/dist/storage/adapters/baseStorageAdapter.d.ts +59 -0
- package/dist/storage/adapters/baseStorageAdapter.js +199 -0
- package/dist/storage/adapters/baseStorageAdapter.js.map +1 -1
- package/dist/storage/adapters/s3CompatibleStorage.d.ts +4 -9
- package/dist/storage/adapters/s3CompatibleStorage.js +18 -33
- package/dist/storage/adapters/s3CompatibleStorage.js.map +1 -1
- package/dist/utils/statisticsCollector.d.ts +37 -0
- package/dist/utils/statisticsCollector.js +142 -0
- package/dist/utils/statisticsCollector.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,6 +99,8 @@ const answer = await chat.ask("What patterns do you see in customer behavior?")
|
|
|
99
99
|
// → AI-powered insights from your knowledge graph!
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
+
<sub>**How it works:** Combines vector embeddings for semantic understanding • Graph relationships for connection patterns • Metadata filtering for structured analysis • Optional LLM for natural language insights</sub>
|
|
103
|
+
|
|
102
104
|
**One line. Zero complexity. Optional LLM for genius-level responses.**
|
|
103
105
|
[📖 **Learn More About Brainy Chat**](BRAINY-CHAT.md)
|
|
104
106
|
|
package/dist/brainyData.js
CHANGED
|
@@ -3236,8 +3236,9 @@ export class BrainyData {
|
|
|
3236
3236
|
if (options.forceRefresh && this.storage && !this.frozen) {
|
|
3237
3237
|
await this.storage.flushStatisticsToStorage();
|
|
3238
3238
|
}
|
|
3239
|
-
// Get statistics from storage
|
|
3240
|
-
const stats = await this.storage.
|
|
3239
|
+
// Get statistics from storage (including throttling metrics if available)
|
|
3240
|
+
const stats = await this.storage.getStatisticsWithThrottling?.() ||
|
|
3241
|
+
await this.storage.getStatistics();
|
|
3241
3242
|
// If statistics are available, use them
|
|
3242
3243
|
if (stats) {
|
|
3243
3244
|
// Initialize result
|
|
@@ -3329,6 +3330,10 @@ export class BrainyData {
|
|
|
3329
3330
|
// Add enhanced statistics from collector
|
|
3330
3331
|
const collectorStats = this.statisticsCollector.getStatistics();
|
|
3331
3332
|
Object.assign(result, collectorStats);
|
|
3333
|
+
// Preserve throttling metrics from storage if available
|
|
3334
|
+
if (stats.throttlingMetrics) {
|
|
3335
|
+
result.throttlingMetrics = stats.throttlingMetrics;
|
|
3336
|
+
}
|
|
3332
3337
|
// Update storage sizes if needed (only periodically for performance)
|
|
3333
3338
|
await this.updateStorageSizesIfNeeded();
|
|
3334
3339
|
}
|