@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.
- package/README.md +710 -1642
- package/dist/brainyData.d.ts +37 -0
- package/dist/distributed/configManager.d.ts +97 -0
- package/dist/distributed/domainDetector.d.ts +77 -0
- package/dist/distributed/hashPartitioner.d.ts +77 -0
- package/dist/distributed/healthMonitor.d.ts +110 -0
- package/dist/distributed/index.d.ts +10 -0
- package/dist/distributed/operationalModes.d.ts +104 -0
- package/dist/types/distributedTypes.d.ts +197 -0
- package/dist/types/distributedTypes.d.ts.map +1 -0
- package/dist/unified.js +1383 -2
- package/dist/unified.min.js +991 -991
- package/dist/utils/crypto.d.ts +25 -0
- package/dist/utils/crypto.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -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