@aleph-ai/tinyaleph 1.5.1 → 1.5.2
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/core/crt-homology.js +35 -8
- package/core/resonance.js +18 -5
- package/core/symbols/elements.js +4 -1
- package/core/symbols/tarot.js +4 -1
- package/core/symbols.js +25 -4
- package/package.json +1 -1
- package/physics/oscillator.js +3 -0
package/core/crt-homology.js
CHANGED
|
@@ -974,6 +974,36 @@ class CoprimeSelector {
|
|
|
974
974
|
// EXPORTS
|
|
975
975
|
// ============================================================================
|
|
976
976
|
|
|
977
|
+
// Named exports for ESM compatibility
|
|
978
|
+
export {
|
|
979
|
+
// Modular arithmetic utilities
|
|
980
|
+
extendedGCD,
|
|
981
|
+
modInverse,
|
|
982
|
+
areCoprime,
|
|
983
|
+
softmax,
|
|
984
|
+
|
|
985
|
+
// Core classes
|
|
986
|
+
ResidueEncoder,
|
|
987
|
+
CRTReconstructor,
|
|
988
|
+
BirkhoffProjector,
|
|
989
|
+
HomologyLoss,
|
|
990
|
+
CRTModularLayer,
|
|
991
|
+
CRTFusedAttention,
|
|
992
|
+
CoprimeSelector
|
|
993
|
+
};
|
|
994
|
+
|
|
995
|
+
// Factory functions as named exports
|
|
996
|
+
export const createCRTLayer = (primes, hiddenDim, options = {}) =>
|
|
997
|
+
new CRTModularLayer(primes, hiddenDim, options);
|
|
998
|
+
|
|
999
|
+
export const createFusedAttention = (primes, hiddenDim, headDim, options = {}) =>
|
|
1000
|
+
new CRTFusedAttention(primes, hiddenDim, headDim, options);
|
|
1001
|
+
|
|
1002
|
+
// Default configurations
|
|
1003
|
+
export const DEFAULT_PRIMES_SMALL = [2, 3, 5, 7];
|
|
1004
|
+
export const DEFAULT_PRIMES_MEDIUM = [5, 7, 11, 13];
|
|
1005
|
+
export const DEFAULT_PRIMES_SEMANTIC = [2, 3, 5, 7, 11];
|
|
1006
|
+
|
|
977
1007
|
export default {
|
|
978
1008
|
// Modular arithmetic utilities
|
|
979
1009
|
extendedGCD,
|
|
@@ -991,14 +1021,11 @@ export default {
|
|
|
991
1021
|
CoprimeSelector,
|
|
992
1022
|
|
|
993
1023
|
// Factory functions
|
|
994
|
-
createCRTLayer
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
createFusedAttention: (primes, hiddenDim, headDim, options = {}) =>
|
|
998
|
-
new CRTFusedAttention(primes, hiddenDim, headDim, options),
|
|
1024
|
+
createCRTLayer,
|
|
1025
|
+
createFusedAttention,
|
|
999
1026
|
|
|
1000
1027
|
// Default configurations
|
|
1001
|
-
DEFAULT_PRIMES_SMALL
|
|
1002
|
-
DEFAULT_PRIMES_MEDIUM
|
|
1003
|
-
DEFAULT_PRIMES_SEMANTIC
|
|
1028
|
+
DEFAULT_PRIMES_SMALL,
|
|
1029
|
+
DEFAULT_PRIMES_MEDIUM,
|
|
1030
|
+
DEFAULT_PRIMES_SEMANTIC
|
|
1004
1031
|
};
|
package/core/resonance.js
CHANGED
|
@@ -310,6 +310,21 @@ function findFibonacciSequences(primes, minLength = 3) {
|
|
|
310
310
|
// Singleton instance for convenience
|
|
311
311
|
const defaultCalculator = new ResonanceCalculator();
|
|
312
312
|
|
|
313
|
+
// Named exports for ESM compatibility
|
|
314
|
+
export {
|
|
315
|
+
ResonanceCalculator,
|
|
316
|
+
resonanceSignature,
|
|
317
|
+
findFibonacciSequences,
|
|
318
|
+
PHI,
|
|
319
|
+
PHI_THRESHOLD,
|
|
320
|
+
PHI_BONUS
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
// Convenience functions using default calculator
|
|
324
|
+
export const calculateResonance = (p1, p2) => defaultCalculator.calculateResonance(p1, p2);
|
|
325
|
+
export const findGoldenPairs = (primes) => defaultCalculator.findGoldenPairs(primes);
|
|
326
|
+
export const findMostResonant = (target, candidates) => defaultCalculator.findMostResonant(target, candidates);
|
|
327
|
+
|
|
313
328
|
export default {
|
|
314
329
|
ResonanceCalculator,
|
|
315
330
|
resonanceSignature,
|
|
@@ -317,9 +332,7 @@ export default {
|
|
|
317
332
|
PHI,
|
|
318
333
|
PHI_THRESHOLD,
|
|
319
334
|
PHI_BONUS,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
findGoldenPairs: (primes) => defaultCalculator.findGoldenPairs(primes),
|
|
324
|
-
findMostResonant: (target, candidates) => defaultCalculator.findMostResonant(target, candidates)
|
|
335
|
+
calculateResonance,
|
|
336
|
+
findGoldenPairs,
|
|
337
|
+
findMostResonant
|
|
325
338
|
};
|
package/core/symbols/elements.js
CHANGED
|
@@ -478,10 +478,13 @@ const abstractSymbols = [
|
|
|
478
478
|
}
|
|
479
479
|
];
|
|
480
480
|
|
|
481
|
+
// Named export for allElementSymbols (used by index.js)
|
|
482
|
+
export const allElementSymbols = [...elementSymbols, ...placeSymbols, ...objectSymbols, ...abstractSymbols];
|
|
483
|
+
|
|
481
484
|
export default {
|
|
482
485
|
elementSymbols,
|
|
483
486
|
placeSymbols,
|
|
484
487
|
objectSymbols,
|
|
485
488
|
abstractSymbols,
|
|
486
|
-
allElementSymbols
|
|
489
|
+
allElementSymbols
|
|
487
490
|
};
|
package/core/symbols/tarot.js
CHANGED
|
@@ -204,8 +204,11 @@ const tarotMinorSuits = [
|
|
|
204
204
|
}
|
|
205
205
|
];
|
|
206
206
|
|
|
207
|
+
// Named export for tarotSymbols (used by index.js)
|
|
208
|
+
export const tarotSymbols = [...tarotMajorArcana, ...tarotMinorSuits];
|
|
209
|
+
|
|
207
210
|
export default {
|
|
208
211
|
tarotMajorArcana,
|
|
209
212
|
tarotMinorSuits,
|
|
210
|
-
tarotSymbols
|
|
213
|
+
tarotSymbols
|
|
211
214
|
};
|
package/core/symbols.js
CHANGED
|
@@ -1,23 +1,44 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Symbol Database
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Comprehensive database of 400+ symbols with:
|
|
5
5
|
* - Unicode emoji representation
|
|
6
6
|
* - Prime number assignment (unique per symbol)
|
|
7
7
|
* - Category organization
|
|
8
8
|
* - Cultural tags for cross-cultural mapping
|
|
9
9
|
* - Rich, detailed meanings
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* Includes:
|
|
12
12
|
* - Jungian archetypes and mythological figures
|
|
13
13
|
* - Tarot Major and Minor Arcana
|
|
14
14
|
* - I-Ching 64 hexagrams
|
|
15
15
|
* - Egyptian hieroglyphs
|
|
16
16
|
* - Natural elements, places, objects, abstracts
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* Refactored to use modular symbol definition files.
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
// Re-export everything from the modular structure
|
|
22
|
+
export {
|
|
23
|
+
symbolDatabase,
|
|
24
|
+
SymbolDatabase,
|
|
25
|
+
SymbolCategory,
|
|
26
|
+
PrimeGenerator,
|
|
27
|
+
archetypeSymbols,
|
|
28
|
+
tarotSymbols,
|
|
29
|
+
ichingHexagrams,
|
|
30
|
+
egyptianHieroglyphs,
|
|
31
|
+
allElementSymbols,
|
|
32
|
+
getSymbol,
|
|
33
|
+
getSymbolByPrime,
|
|
34
|
+
getSymbolsByCategory,
|
|
35
|
+
getSymbolsByTag,
|
|
36
|
+
search,
|
|
37
|
+
encode,
|
|
38
|
+
decode,
|
|
39
|
+
getAllSymbols,
|
|
40
|
+
getStats
|
|
41
|
+
} from './symbols/index.js';
|
|
22
42
|
|
|
23
|
-
|
|
43
|
+
// Default export
|
|
44
|
+
export { default } from './symbols/index.js';
|
package/package.json
CHANGED