Add a write-time incremental aggregation engine that maintains running
totals on every add/update/delete for O(1) read performance. Integrates
into brain.find({ aggregate }) for a unified query API.
Core features:
- AggregationIndex with defineAggregate()/removeAggregate() API
- Five aggregation operations: SUM, COUNT, AVG, MIN, MAX
- GROUP BY with multiple dimensions including time windows
- Time window bucketing: hour, day, week, month, quarter, year, custom
- Materialization of results as NounType.Measurement entities
- Debounced persistence of definitions and state to storage
- Definition change detection via FNV-1a hashing with auto-rebuild
- Infinite loop prevention for materialized entities
- 'aggregation' plugin provider key for native acceleration
- Lazy initialization (created on first defineAggregate() call)
- 73 tests (unit + integration) covering all functionality
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| aggregation.test.ts | ||
| all-apis-comprehensive.test.ts | ||
| api-parameter-validation.test.ts | ||
| azure-storage.test.ts | ||
| batchImportWithRelations.test.ts | ||
| brainy-complete.integration.test.ts | ||
| brainy-core.integration.test.ts | ||
| brainy-phase1c-integration.test.ts | ||
| bun-compile-test.ts | ||
| clear-persistence.test.ts | ||
| clear-vfs.test.ts | ||
| commit-ref-bug.test.ts | ||
| commit-state-capture.test.ts | ||
| count-synchronization.test.ts | ||
| cow-commit-storage.test.ts | ||
| cow-full-integration.test.ts | ||
| empty-tree-bug.test.ts | ||
| entity-confidence-weight.test.ts | ||
| find-unified-integration.test.ts | ||
| fork-persistence.test.ts | ||
| gcs-native-storage.test.ts | ||
| gcs-persistence-fix.test.ts | ||
| get-relations-fix.test.ts | ||
| history-ref-resolution-bug.test.ts | ||
| hnsw-rebuild.test.ts | ||
| hybrid-search-cow.test.ts | ||
| initial-commit-null-parent.test.ts | ||
| memory-enhancements-v5.11.0.test.ts | ||
| metadata-only-comprehensive.test.ts | ||
| metadata-vector-exclusion.test.ts | ||
| migration.test.ts | ||
| phase3TypeFirstQuery.integration.test.ts | ||
| readAfterWrite.test.ts | ||
| relationship-intelligence.test.ts | ||
| remaining-apis.test.ts | ||
| s3-storage.test.ts | ||
| smart-import.test.ts | ||
| storage-batch-operations.test.ts | ||
| typeAwareHNSW.integration.test.ts | ||
| update-asymmetry.test.ts | ||
| versioning.test.ts | ||
| vfs-and-graph-entities.test.ts | ||
| vfs-api-wiring.test.ts | ||
| vfs-debug.test.ts | ||
| vfs-historical-reads.test.ts | ||
| vfs-import-verification.test.ts | ||
| vfs-knowledge-separation.test.ts | ||
| vfs-performance-v5.11.1.test.ts | ||
| vfs-versioning.test.ts | ||
| wasm-embeddings.test.ts | ||