@aleph-ai/tinyaleph 1.5.2 → 1.5.4

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.
@@ -492,4 +492,10 @@ export {
492
492
  BindingAffinityCalculator,
493
493
  MolecularDocker,
494
494
  ProteinProteinDocker
495
+ };
496
+
497
+ export default {
498
+ BindingAffinityCalculator,
499
+ MolecularDocker,
500
+ ProteinProteinDocker
495
501
  };
@@ -652,4 +652,18 @@ export {
652
652
  DNACircuit,
653
653
  createHalfAdder,
654
654
  createFullAdder
655
+ };
656
+
657
+ export default {
658
+ DNAStrand,
659
+ DNADuplex,
660
+ ANDGate,
661
+ ORGate,
662
+ NOTGate,
663
+ NANDGate,
664
+ SeesawGate,
665
+ StrandDisplacementReaction,
666
+ DNACircuit,
667
+ createHalfAdder,
668
+ createFullAdder
655
669
  };
@@ -328,4 +328,27 @@ export {
328
328
  getAminoAcidProperties,
329
329
  getChargeFromPrime,
330
330
  getHydrophobicityFromPrime
331
+ };
332
+
333
+ export default {
334
+ NUCLEOTIDE_PRIMES,
335
+ PRIME_TO_NUCLEOTIDE,
336
+ DNA_COMPLEMENTS,
337
+ PRIME_COMPLEMENTS,
338
+ AMINO_ACID_PRIMES,
339
+ PRIME_TO_AMINO_ACID,
340
+ AMINO_ACID_PROPERTIES,
341
+ encodeCodon,
342
+ decodeCodon,
343
+ encodeDNA,
344
+ decodeDNA,
345
+ encodeRNA,
346
+ decodeRNA,
347
+ encodeProtein,
348
+ decodeProtein,
349
+ detectSequenceType,
350
+ parseFASTA,
351
+ getAminoAcidProperties,
352
+ getChargeFromPrime,
353
+ getHydrophobicityFromPrime
331
354
  };
@@ -443,4 +443,8 @@ class FoldingTransform {
443
443
 
444
444
  export {
445
445
  FoldingTransform
446
+ };
447
+
448
+ export default {
449
+ FoldingTransform
446
450
  };
@@ -262,4 +262,22 @@ export {
262
262
  calculateCAI,
263
263
  getSynonymousCodons,
264
264
  classifyMutation
265
+ };
266
+
267
+ export default {
268
+ STANDARD_GENETIC_CODE,
269
+ VERTEBRATE_MITOCHONDRIAL_CODE,
270
+ YEAST_MITOCHONDRIAL_CODE,
271
+ START_CODONS,
272
+ STOP_CODONS,
273
+ CODON_USAGE_ECOLI,
274
+ translateCodon,
275
+ getCodonsForAminoAcid,
276
+ getCodonDegeneracy,
277
+ isStartCodon,
278
+ isStopCodon,
279
+ calculateGCContent,
280
+ calculateCAI,
281
+ getSynonymousCodons,
282
+ classifyMutation
265
283
  };
@@ -220,4 +220,8 @@ class TranscriptionOperator {
220
220
 
221
221
  export {
222
222
  TranscriptionOperator
223
+ };
224
+
225
+ export default {
226
+ TranscriptionOperator
223
227
  };
@@ -263,4 +263,8 @@ class TranslationOperator {
263
263
 
264
264
  export {
265
265
  TranslationOperator
266
+ };
267
+
268
+ export default {
269
+ TranslationOperator
266
270
  };
@@ -647,4 +647,11 @@ export {
647
647
  PrimeStateKeyGenerator,
648
648
  EntropySensitiveEncryptor,
649
649
  HolographicKeyDistributor
650
+ };
651
+
652
+ export default {
653
+ CryptographicBackend,
654
+ PrimeStateKeyGenerator,
655
+ EntropySensitiveEncryptor,
656
+ HolographicKeyDistributor
650
657
  };
@@ -272,4 +272,8 @@ class ScientificBackend extends Backend {
272
272
 
273
273
  export {
274
274
  ScientificBackend
275
+ };
276
+
277
+ export default {
278
+ ScientificBackend
275
279
  };
@@ -527,4 +527,8 @@ class SemanticBackend extends Backend {
527
527
 
528
528
  export {
529
529
  SemanticBackend
530
+ };
531
+
532
+ export default {
533
+ SemanticBackend
530
534
  };
@@ -374,4 +374,8 @@ class TwoLayerEngine {
374
374
 
375
375
  export {
376
376
  TwoLayerEngine
377
+ };
378
+
379
+ export default {
380
+ TwoLayerEngine
377
381
  };
package/core/compound.js CHANGED
@@ -514,19 +514,37 @@ class CompoundBuilder {
514
514
  // Singleton instance
515
515
  const defaultBuilder = new CompoundBuilder();
516
516
 
517
+ // Named exports for ESM compatibility
518
+ const compoundBuilder = defaultBuilder;
519
+ const createCompound = (id, components, meaning, tags) =>
520
+ defaultBuilder.createCompound(id, components, meaning, tags);
521
+ const getCompound = (id) => defaultBuilder.getCompound(id);
522
+ const createSequence = (id, symbols, type, desc) =>
523
+ defaultBuilder.createSequence(id, symbols, type, desc);
524
+ const getSequence = (id) => defaultBuilder.getSequence(id);
525
+ const findCompoundsContaining = (symbolId) =>
526
+ defaultBuilder.findCompoundsContaining(symbolId);
527
+
528
+ export {
529
+ CompoundBuilder,
530
+ CompoundSymbol,
531
+ SymbolSequence,
532
+ compoundBuilder,
533
+ createCompound,
534
+ getCompound,
535
+ createSequence,
536
+ getSequence,
537
+ findCompoundsContaining
538
+ };
539
+
517
540
  export default {
518
541
  CompoundBuilder,
519
542
  CompoundSymbol,
520
543
  SymbolSequence,
521
- compoundBuilder: defaultBuilder,
522
-
523
- // Convenience functions
524
- createCompound: (id, components, meaning, tags) =>
525
- defaultBuilder.createCompound(id, components, meaning, tags),
526
- getCompound: (id) => defaultBuilder.getCompound(id),
527
- createSequence: (id, symbols, type, desc) =>
528
- defaultBuilder.createSequence(id, symbols, type, desc),
529
- getSequence: (id) => defaultBuilder.getSequence(id),
530
- findCompoundsContaining: (symbolId) =>
531
- defaultBuilder.findCompoundsContaining(symbolId)
544
+ compoundBuilder,
545
+ createCompound,
546
+ getCompound,
547
+ createSequence,
548
+ getSequence,
549
+ findCompoundsContaining
532
550
  };
package/core/errors.js CHANGED
@@ -576,4 +576,21 @@ export {
576
576
  withErrorHandling,
577
577
  errorBoundary,
578
578
  withTimeout
579
+ };
580
+
581
+ // Default export for compatibility with modular.js
582
+ export default {
583
+ LogLevel,
584
+ LogLevelNames,
585
+ ErrorCategory,
586
+ AlephError,
587
+ NetworkError,
588
+ LLMError,
589
+ ValidationError,
590
+ TimeoutError,
591
+ SimpleEventEmitter,
592
+ ErrorHandler,
593
+ withErrorHandling,
594
+ errorBoundary,
595
+ withTimeout
579
596
  };
package/core/index.js CHANGED
@@ -166,6 +166,216 @@ let rformerTF = null;
166
166
  // Dynamic import for optional TensorFlow.js support
167
167
  // Use: const tf = await import('./rformer-tf.js') when needed
168
168
 
169
+ // Named exports for ESM compatibility
170
+ export {
171
+ // Hypercomplex algebra
172
+ Hypercomplex,
173
+
174
+ // Fano plane / multiplication
175
+ FANO_LINES,
176
+ octonionMultiplyIndex,
177
+ sedenionMultiplyIndex,
178
+ multiplyIndices,
179
+ buildMultiplicationTable,
180
+
181
+ // Prime utilities
182
+ primeGenerator,
183
+ nthPrime,
184
+ primesUpTo,
185
+ isPrime,
186
+ factorize,
187
+ primeSignature,
188
+ firstNPrimes,
189
+ GaussianInteger,
190
+ EisensteinInteger,
191
+ primeToFrequency,
192
+ primeToAngle,
193
+ sumOfTwoSquares,
194
+ DEFAULT_PRIMES,
195
+
196
+ // LLM client
197
+ LLM,
198
+
199
+ // Prime Hilbert Space
200
+ Complex,
201
+ PrimeState,
202
+ ResonanceOperators,
203
+ EntropyDrivenEvolution,
204
+ encodeMemory,
205
+ symbolicCompute,
206
+ QuaternionPrime,
207
+ PrimeResonanceIdentity,
208
+ PhaseLockedRing,
209
+ HolographicField,
210
+ EntangledNode,
211
+ ResonantFragment,
212
+ DELTA_S,
213
+
214
+ // Golden Ratio Resonance
215
+ PHI,
216
+ PHI_THRESHOLD,
217
+ PHI_BONUS,
218
+ ResonanceCalculator,
219
+ resonanceSignature,
220
+ findFibonacciSequences,
221
+ calculateResonance,
222
+ findGoldenPairs,
223
+ findMostResonant,
224
+
225
+ // Symbol Database
226
+ SymbolDatabase,
227
+ SymbolCategory,
228
+ PrimeGenerator,
229
+ symbolDatabase,
230
+ getSymbol,
231
+ getSymbolByPrime,
232
+ searchSymbols,
233
+ encodeSymbols,
234
+ decodeSymbols,
235
+
236
+ // Semantic Inference
237
+ SemanticInference,
238
+ EntityExtractor,
239
+ InferenceMethod,
240
+ semanticInference,
241
+ entityExtractor,
242
+ inferSymbol,
243
+ inferSymbols,
244
+ extractEntities,
245
+ extractAndInfer,
246
+ inferWithResonance,
247
+ inferMostResonant,
248
+
249
+ // Compound Builder
250
+ CompoundBuilder,
251
+ CompoundSymbol,
252
+ SymbolSequence,
253
+ compoundBuilder,
254
+ createCompound,
255
+ getCompound,
256
+ createSequence,
257
+ getSequence,
258
+ findCompoundsContaining,
259
+
260
+ // ResoFormer ML Primitives
261
+ Quaternion,
262
+ SparsePrimeState,
263
+ resonanceScore,
264
+ resonantAttention,
265
+ hamiltonCompose,
266
+ measureNonCommutativity,
267
+ computeCoherence,
268
+ haltingDecision,
269
+ coherenceGatedCompute,
270
+ EntropyCollapseHead,
271
+ generateAttractorCodebook,
272
+ PRGraphMemory,
273
+ applyResonanceOperator,
274
+
275
+ // ResoFormer Complete Layers
276
+ ResonantMultiHeadAttention,
277
+ PrimeFFN,
278
+ PrimeLayerNorm,
279
+ PositionalPrimeEncoding,
280
+ ResoFormerBlock,
281
+ ResoFormer,
282
+
283
+ // CRT-enhanced ResoFormer
284
+ CRTResonantAttention,
285
+ HomologyRegularizedBlock,
286
+ CRTResoFormer,
287
+ createCRTResoFormer,
288
+
289
+ // Prime Entanglement Graph
290
+ EntanglementEdge,
291
+ PrimeEntanglementGraph,
292
+ createEntanglementGraph,
293
+
294
+ // Event System
295
+ AlephEventEmitter,
296
+ AlephMonitor,
297
+ EvolutionStream,
298
+ createEvolutionStream,
299
+ createMonitor,
300
+
301
+ // Formal Type System
302
+ NounType,
303
+ AdjType,
304
+ SentenceType,
305
+ NounTerm,
306
+ AdjTerm,
307
+ ChainTerm,
308
+ FusionTerm,
309
+ NounSentence,
310
+ SeqSentence,
311
+ ImplSentence,
312
+ TypingContext,
313
+ TypingJudgment,
314
+ TypeChecker,
315
+ N,
316
+ A,
317
+ FUSE,
318
+ CHAIN,
319
+ SENTENCE,
320
+ SEQ,
321
+ IMPL,
322
+
323
+ // Reduction Semantics
324
+ PrimeOperator,
325
+ NextPrimeOperator,
326
+ ModularPrimeOperator,
327
+ ResonancePrimeOperator,
328
+ IdentityPrimeOperator,
329
+ DEFAULT_OPERATOR,
330
+ ReductionStep,
331
+ ReductionTrace,
332
+ ReductionSystem,
333
+ isNormalForm,
334
+ isReducible,
335
+ termSize,
336
+ FusionCanonicalizer,
337
+ NormalFormVerifier,
338
+ demonstrateStrongNormalization,
339
+ testLocalConfluence,
340
+
341
+ // Lambda Calculus
342
+ LambdaExpr,
343
+ VarExpr,
344
+ ConstExpr,
345
+ LamExpr,
346
+ AppExpr,
347
+ PairExpr,
348
+ ImplExpr,
349
+ PrimOpExpr,
350
+ Translator,
351
+ TypeDirectedTranslator,
352
+ LambdaEvaluator,
353
+ Semantics,
354
+ ConceptInterpreter,
355
+
356
+ // Enochian
357
+ enochian,
358
+ enochianVocabulary,
359
+
360
+ // CRT-Homology
361
+ extendedGCD,
362
+ modInverse,
363
+ areCoprime,
364
+ softmax,
365
+ ResidueEncoder,
366
+ CRTReconstructor,
367
+ BirkhoffProjector,
368
+ HomologyLoss,
369
+ CRTModularLayer,
370
+ CRTFusedAttention,
371
+ CoprimeSelector,
372
+ createCRTLayer,
373
+ createFusedAttention,
374
+ DEFAULT_PRIMES_SMALL,
375
+ DEFAULT_PRIMES_MEDIUM,
376
+ DEFAULT_PRIMES_SEMANTIC
377
+ };
378
+
169
379
  export default {
170
380
  // Hypercomplex algebra
171
381
  Hypercomplex,
package/core/inference.js CHANGED
@@ -584,22 +584,47 @@ class EntityExtractor {
584
584
  const defaultInference = new SemanticInference();
585
585
  const defaultExtractor = new EntityExtractor();
586
586
 
587
+ // Convenience function aliases
588
+ const semanticInference = defaultInference;
589
+ const entityExtractor = defaultExtractor;
590
+ const inferSymbol = (text) => defaultInference.inferSymbol(text);
591
+ const inferSymbols = (entities) => defaultInference.inferSymbols(entities);
592
+ const inferWithResonance = (text, options) => defaultInference.inferWithResonance(text, options);
593
+ const inferMostResonant = (text, contextSymbols) => defaultInference.inferMostResonant(text, contextSymbols);
594
+ const extractEntities = (text) => defaultExtractor.extract(text);
595
+ const extractAndInfer = (text) => defaultExtractor.extractAndInfer(text, defaultInference);
596
+
597
+ // Named exports for ESM compatibility
598
+ export {
599
+ SemanticInference,
600
+ EntityExtractor,
601
+ InferenceMethod,
602
+ semanticInference,
603
+ entityExtractor,
604
+ inferSymbol,
605
+ inferSymbols,
606
+ inferWithResonance,
607
+ inferMostResonant,
608
+ extractEntities,
609
+ extractAndInfer
610
+ };
611
+
587
612
  export default {
588
613
  SemanticInference,
589
614
  EntityExtractor,
590
615
  InferenceMethod,
591
616
 
592
617
  // Singleton instances
593
- semanticInference: defaultInference,
594
- entityExtractor: defaultExtractor,
618
+ semanticInference,
619
+ entityExtractor,
595
620
 
596
621
  // Convenience functions
597
- inferSymbol: (text) => defaultInference.inferSymbol(text),
598
- inferSymbols: (entities) => defaultInference.inferSymbols(entities),
622
+ inferSymbol,
623
+ inferSymbols,
599
624
 
600
625
  // Resonance-enhanced inference
601
- inferWithResonance: (text, options) => defaultInference.inferWithResonance(text, options),
602
- inferMostResonant: (text, contextSymbols) => defaultInference.inferMostResonant(text, contextSymbols),
603
- extractEntities: (text) => defaultExtractor.extract(text),
604
- extractAndInfer: (text) => defaultExtractor.extractAndInfer(text, defaultInference)
626
+ inferWithResonance,
627
+ inferMostResonant,
628
+ extractEntities,
629
+ extractAndInfer
605
630
  };
package/core/logger.js CHANGED
@@ -346,4 +346,12 @@ export {
346
346
  createLogger,
347
347
  LogLevel,
348
348
  LogLevelNames
349
+ };
350
+
351
+ // Default export for compatibility with modular.js
352
+ export default {
353
+ Logger,
354
+ createLogger,
355
+ LogLevel,
356
+ LogLevelNames
349
357
  };
package/core/types.js CHANGED
@@ -878,8 +878,16 @@ function IMPL(s1, s2) {
878
878
  // EXPORTS
879
879
  // ============================================================================
880
880
 
881
+ // Type aliases for compatibility with core/index.js
882
+ const NounType = Types.NOUN;
883
+ const AdjType = Types.ADJECTIVE;
884
+ const SentenceType = Types.SENTENCE;
885
+
881
886
  export {
882
887
  Types,
888
+ NounType,
889
+ AdjType,
890
+ SentenceType,
883
891
  Term,
884
892
  NounTerm,
885
893
  AdjTerm,
package/engine/index.js CHANGED
@@ -6,4 +6,9 @@ import { AlephEngine } from './aleph.js';
6
6
 
7
7
  export {
8
8
  AlephEngine
9
+ };
10
+
11
+ // Default export for compatibility with modular.js
12
+ export default {
13
+ AlephEngine
9
14
  };
package/modular.js CHANGED
@@ -23,27 +23,7 @@
23
23
  * - Safety Layer - Ethical constraints and emergency shutdown
24
24
  */
25
25
 
26
- // Core mathematical foundation
27
- import core from './core/index.js';
28
26
 
29
- // Enochian Packet Layer (Section 7.4 of whitepaper)
30
- import enochian from './core/enochian.js';
31
- import enochianVocabulary from './core/enochian-vocabulary.js';
32
-
33
- // Browser-compatible utilities (extracted from apps/sentient)
34
- import errors from './core/errors.js';
35
- import logger from './core/logger.js';
36
- import metrics from './telemetry/metrics.js';
37
-
38
- // Observer architecture (Sentient Observer core modules)
39
- import smf from './observer/smf.js';
40
- import prsc from './observer/prsc.js';
41
- import temporal from './observer/temporal.js';
42
- import entanglement from './observer/entanglement.js';
43
- import agency from './observer/agency.js';
44
- import boundary from './observer/boundary.js';
45
- import safety from './observer/safety.js';
46
- import hqe from './observer/hqe.js';
47
27
  const {
48
28
  Hypercomplex,
49
29
  FANO_LINES,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-ai/tinyaleph",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "Prime-resonant semantic computing framework - hypercomplex algebra, oscillator dynamics, and entropy-minimizing reasoning",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/physics/index.js CHANGED
@@ -112,4 +112,57 @@ export {
112
112
  bornMeasurement,
113
113
  partialCollapse,
114
114
  applyDecoherence
115
+ };
116
+
117
+ // Default export for compatibility with modular.js
118
+ export default {
119
+ Oscillator,
120
+ OscillatorBank,
121
+ KuramotoModel,
122
+ NetworkKuramoto,
123
+ AdaptiveKuramoto,
124
+ SakaguchiKuramoto,
125
+ SmallWorldKuramoto,
126
+ MultiSystemCoupling,
127
+ createHierarchicalCoupling,
128
+ createPeerCoupling,
129
+ StochasticKuramoto,
130
+ ColoredNoiseKuramoto,
131
+ ThermalKuramoto,
132
+ gaussianRandom,
133
+ PrimeonZLadderU,
134
+ createPrimeonLadder,
135
+ shannonEntropyNats,
136
+ probsOf,
137
+ normalizeComplex,
138
+ Complex,
139
+ ZChannel,
140
+ PrimeonZLadderMulti,
141
+ createMultiChannelLadder,
142
+ createAdiabaticSchedule,
143
+ KuramotoCoupledLadder,
144
+ createKuramotoLadder,
145
+ runCollapsePressureExperiment,
146
+ kuramotoOrderParameter,
147
+ getPhase,
148
+ shannonEntropy,
149
+ stateEntropy,
150
+ coherence,
151
+ mutualInformation,
152
+ relativeEntropy,
153
+ jointEntropy,
154
+ oscillatorEntropy,
155
+ estimateLyapunov,
156
+ classifyStability,
157
+ adaptiveCoupling,
158
+ localLyapunov,
159
+ delayEmbedding,
160
+ stabilityMargin,
161
+ collapseProbability,
162
+ shouldCollapse,
163
+ measureState,
164
+ collapseToIndex,
165
+ bornMeasurement,
166
+ partialCollapse,
167
+ applyDecoherence
115
168
  };
@@ -700,4 +700,15 @@ export {
700
700
  Histogram,
701
701
  Summary,
702
702
  MetricRegistry
703
+ };
704
+
705
+ // Default export for compatibility with modular.js
706
+ export default {
707
+ MetricType,
708
+ Metric,
709
+ Counter,
710
+ Gauge,
711
+ Histogram,
712
+ Summary,
713
+ MetricRegistry
703
714
  };