@soulcraft/brainy 0.17.0 → 0.19.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.
@@ -1,3 +1,4 @@
1
1
  export * from './distance.js';
2
2
  export * from './embedding.js';
3
3
  export * from './workerUtils.js';
4
+ export * from './statistics.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,iBAAiB,CAAA"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Utility functions for retrieving statistics from Brainy
3
+ */
4
+ import { BrainyData } from '../brainyData.js';
5
+ /**
6
+ * Get statistics about the current state of a BrainyData instance
7
+ * This function provides access to statistics at the root level of the library
8
+ *
9
+ * @param instance A BrainyData instance to get statistics from
10
+ * @returns Object containing counts of nouns, verbs, metadata entries, and HNSW index size
11
+ * @throws Error if the instance is not provided or if statistics retrieval fails
12
+ */
13
+ export declare function getStatistics(instance: BrainyData): Promise<{
14
+ nounCount: number;
15
+ verbCount: number;
16
+ metadataCount: number;
17
+ hnswIndexSize: number;
18
+ }>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statistics.d.ts","sourceRoot":"","sources":["../../src/utils/statistics.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAE7C;;;;;;;GAOG;AACH,wBAAsB,aAAa,CAAC,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC;IAC/D,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAC,CAWD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "description": "A vector graph database using HNSW indexing with Origin Private File System storage",
5
5
  "main": "dist/unified.js",
6
6
  "module": "dist/unified.js",