@soulcraft/brainy 0.37.0 → 0.38.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.
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Cross-platform crypto utilities
3
+ * Provides hashing functions that work in both Node.js and browser environments
4
+ */
5
+ /**
6
+ * Simple string hash function that works in all environments
7
+ * Uses djb2 algorithm - fast and good distribution
8
+ * @param str - String to hash
9
+ * @returns Positive integer hash
10
+ */
11
+ export declare function hashString(str: string): number;
12
+ /**
13
+ * Alternative: FNV-1a hash algorithm
14
+ * Good distribution and fast
15
+ * @param str - String to hash
16
+ * @returns Positive integer hash
17
+ */
18
+ export declare function fnv1aHash(str: string): number;
19
+ /**
20
+ * Generate a deterministic hash for partitioning
21
+ * Uses the most appropriate algorithm for the environment
22
+ * @param input - Input string to hash
23
+ * @returns Positive integer hash suitable for modulo operations
24
+ */
25
+ export declare function getPartitionHash(input: string): number;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../src/utils/crypto.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ9C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAO7C;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAItD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soulcraft/brainy",
3
- "version": "0.37.0",
3
+ "version": "0.38.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",