@aleph-ai/tinyaleph 1.4.4 → 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/backends/bioinformatics/binding.js +44 -52
- package/backends/bioinformatics/dna-computing.js +14 -23
- package/backends/bioinformatics/encoding.js +22 -30
- package/backends/bioinformatics/folding.js +24 -32
- package/backends/bioinformatics/genetic-code.js +17 -21
- package/backends/bioinformatics/index.js +12 -12
- package/backends/bioinformatics/transcription.js +5 -3
- package/backends/bioinformatics/translation.js +6 -4
- package/backends/cryptographic/index.js +10 -9
- package/backends/index.js +7 -6
- package/backends/interface.js +4 -1
- package/backends/scientific/index.js +7 -4
- package/backends/semantic/index.js +7 -4
- package/backends/semantic/surface.js +2 -1
- package/backends/semantic/two-layer.js +5 -3
- package/core/beacon.js +10 -9
- package/core/compound.js +4 -4
- package/core/crt-homology.js +40 -13
- package/core/enochian-vocabulary.js +5 -17
- package/core/enochian.js +3 -2
- package/core/entanglement.js +7 -7
- package/core/errors.js +2 -10
- package/core/events.js +7 -6
- package/core/fano.js +7 -6
- package/core/hilbert.js +40 -34
- package/core/hypercomplex.js +4 -2
- package/core/index.js +42 -80
- package/core/inference.js +6 -6
- package/core/lambda.js +5 -18
- package/core/llm.js +1 -1
- package/core/logger.js +3 -4
- package/core/prime.js +26 -1
- package/core/quaternion-semantics.js +3 -3
- package/core/reduction.js +5 -21
- package/core/resonance.js +20 -6
- package/core/rformer-crt.js +15 -29
- package/core/rformer-layers.js +12 -14
- package/core/rformer-tf.js +34 -43
- package/core/rformer.js +17 -32
- package/core/sieve.js +8 -3
- package/core/symbols/archetypes.js +3 -3
- package/core/symbols/base.js +4 -4
- package/core/symbols/elements.js +6 -3
- package/core/symbols/hieroglyphs.js +3 -3
- package/core/symbols/iching.js +3 -3
- package/core/symbols/index.js +32 -18
- package/core/symbols/tarot.js +6 -3
- package/core/symbols.js +26 -4
- package/core/topology.js +3 -14
- package/core/types.js +3 -14
- package/engine/aleph.js +8 -6
- package/engine/index.js +4 -2
- package/index.js +3 -2
- package/modular.js +18 -41
- package/package.json +4 -2
- package/physics/collapse.js +10 -11
- package/physics/entropy.js +8 -8
- package/physics/index.js +70 -102
- package/physics/kuramoto-coupled-ladder.js +10 -14
- package/physics/kuramoto.js +5 -2
- package/physics/lyapunov.js +7 -7
- package/physics/oscillator.js +5 -1
- package/physics/primeon_z_ladder_multi.js +7 -9
- package/physics/primeon_z_ladder_u.js +8 -9
- package/physics/stochastic-kuramoto.js +7 -7
- package/physics/sync-models.js +11 -14
- package/telemetry/index.js +1 -1
- package/telemetry/metrics.js +3 -8
|
@@ -1,64 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Molecular Binding - Protein-Ligand and Protein-Protein Interactions
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Models molecular binding using prime resonance:
|
|
5
5
|
* - Binding affinity correlates with golden ratio resonance
|
|
6
6
|
* - Docking uses multi-system Kuramoto coupling
|
|
7
7
|
* - Affinity scoring combines electrostatic, hydrophobic, and resonance terms
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
getHydrophobicityFromPrime
|
|
14
|
-
} = require('./encoding');
|
|
10
|
+
import { AMINO_ACID_PRIMES,
|
|
11
|
+
getChargeFromPrime,
|
|
12
|
+
getHydrophobicityFromPrime } from './encoding.js';
|
|
15
13
|
|
|
16
|
-
//
|
|
17
|
-
|
|
14
|
+
// Golden ratio constant
|
|
15
|
+
const PHI = 1.618033988749895;
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
calculateResonance = (p1, p2) => {
|
|
33
|
-
const ratio = Math.max(p1, p2) / Math.min(p1, p2);
|
|
34
|
-
return 1 / (1 + Math.abs(ratio - PHI));
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
findGoldenPairs = (primes) => {
|
|
38
|
-
const pairs = [];
|
|
39
|
-
for (let i = 0; i < primes.length; i++) {
|
|
40
|
-
for (let j = i + 1; j < primes.length; j++) {
|
|
41
|
-
if (calculateResonance(primes[i], primes[j]) > 0.8) {
|
|
42
|
-
pairs.push([primes[i], primes[j]]);
|
|
43
|
-
}
|
|
17
|
+
// Fallback implementations (used if core modules don't provide these)
|
|
18
|
+
const fallbackCalculateResonance = (p1, p2) => {
|
|
19
|
+
const ratio = Math.max(p1, p2) / Math.min(p1, p2);
|
|
20
|
+
return 1 / (1 + Math.abs(ratio - PHI));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const fallbackFindGoldenPairs = (primes) => {
|
|
24
|
+
const pairs = [];
|
|
25
|
+
for (let i = 0; i < primes.length; i++) {
|
|
26
|
+
for (let j = i + 1; j < primes.length; j++) {
|
|
27
|
+
if (fallbackCalculateResonance(primes[i], primes[j]) > 0.8) {
|
|
28
|
+
pairs.push([primes[i], primes[j]]);
|
|
44
29
|
}
|
|
45
30
|
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
31
|
+
}
|
|
32
|
+
return pairs;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const fallbackResonanceSignature = (primes) => {
|
|
36
|
+
let sum = 0, count = 0;
|
|
37
|
+
for (let i = 0; i < primes.length; i++) {
|
|
38
|
+
for (let j = i + 1; j < primes.length; j++) {
|
|
39
|
+
sum += fallbackCalculateResonance(primes[i], primes[j]);
|
|
40
|
+
count++;
|
|
56
41
|
}
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
}
|
|
43
|
+
return { mean: sum / Math.max(count, 1), count };
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const fallbackPrimeToFrequency = (p, base = 1, logScale = 10) => base + Math.log(p) / logScale;
|
|
47
|
+
|
|
48
|
+
// Export calculation functions - fallbacks are used directly
|
|
49
|
+
// Core module integration can be done by consumers if needed
|
|
50
|
+
const calculateResonance = fallbackCalculateResonance;
|
|
51
|
+
const findGoldenPairs = fallbackFindGoldenPairs;
|
|
52
|
+
const resonanceSignature = fallbackResonanceSignature;
|
|
53
|
+
const primeToFrequency = fallbackPrimeToFrequency;
|
|
62
54
|
|
|
63
55
|
/**
|
|
64
56
|
* BindingAffinityCalculator
|
|
@@ -496,8 +488,8 @@ class ProteinProteinDocker extends MolecularDocker {
|
|
|
496
488
|
}
|
|
497
489
|
}
|
|
498
490
|
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
491
|
+
export {
|
|
492
|
+
BindingAffinityCalculator,
|
|
493
|
+
MolecularDocker,
|
|
494
|
+
ProteinProteinDocker
|
|
503
495
|
};
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
* - Qian & Winfree (2011) - Seesaw gates
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
NUCLEOTIDE_PRIMES,
|
|
18
|
+
import { NUCLEOTIDE_PRIMES,
|
|
20
19
|
PRIME_COMPLEMENTS,
|
|
21
20
|
encodeDNA,
|
|
22
|
-
decodeDNA
|
|
23
|
-
} = require('./encoding');
|
|
21
|
+
decodeDNA } from './encoding.js';
|
|
24
22
|
|
|
25
23
|
// ============================================================================
|
|
26
24
|
// DNA Strand Representation
|
|
@@ -642,23 +640,16 @@ class SeesawGate {
|
|
|
642
640
|
}
|
|
643
641
|
}
|
|
644
642
|
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
// Reactions
|
|
658
|
-
StrandDisplacementReaction,
|
|
659
|
-
|
|
660
|
-
// Circuits
|
|
661
|
-
DNACircuit,
|
|
662
|
-
createHalfAdder,
|
|
663
|
-
createFullAdder,
|
|
643
|
+
export {
|
|
644
|
+
DNAStrand,
|
|
645
|
+
DNADuplex,
|
|
646
|
+
ANDGate,
|
|
647
|
+
ORGate,
|
|
648
|
+
NOTGate,
|
|
649
|
+
NANDGate,
|
|
650
|
+
SeesawGate,
|
|
651
|
+
StrandDisplacementReaction,
|
|
652
|
+
DNACircuit,
|
|
653
|
+
createHalfAdder,
|
|
654
|
+
createFullAdder
|
|
664
655
|
};
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* - Pyrimidines (T, C): smaller primes (2, 3)
|
|
21
21
|
* - Watson-Crick pairs have symmetric products: A-T=14, G-C=33
|
|
22
22
|
*/
|
|
23
|
+
|
|
23
24
|
const NUCLEOTIDE_PRIMES = {
|
|
24
25
|
'A': 7, // Adenine (purine)
|
|
25
26
|
'T': 2, // Thymine (pyrimidine) - pairs with A
|
|
@@ -306,34 +307,25 @@ function getHydrophobicityFromPrime(prime) {
|
|
|
306
307
|
return AMINO_ACID_PROPERTIES[aa]?.hydrophobicity || 0;
|
|
307
308
|
}
|
|
308
309
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
encodeProtein,
|
|
331
|
-
decodeProtein,
|
|
332
|
-
|
|
333
|
-
// Utilities
|
|
334
|
-
detectSequenceType,
|
|
335
|
-
parseFASTA,
|
|
336
|
-
getAminoAcidProperties,
|
|
337
|
-
getChargeFromPrime,
|
|
338
|
-
getHydrophobicityFromPrime,
|
|
310
|
+
export {
|
|
311
|
+
NUCLEOTIDE_PRIMES,
|
|
312
|
+
PRIME_TO_NUCLEOTIDE,
|
|
313
|
+
DNA_COMPLEMENTS,
|
|
314
|
+
PRIME_COMPLEMENTS,
|
|
315
|
+
AMINO_ACID_PRIMES,
|
|
316
|
+
PRIME_TO_AMINO_ACID,
|
|
317
|
+
AMINO_ACID_PROPERTIES,
|
|
318
|
+
encodeCodon,
|
|
319
|
+
decodeCodon,
|
|
320
|
+
encodeDNA,
|
|
321
|
+
decodeDNA,
|
|
322
|
+
encodeRNA,
|
|
323
|
+
decodeRNA,
|
|
324
|
+
encodeProtein,
|
|
325
|
+
decodeProtein,
|
|
326
|
+
detectSequenceType,
|
|
327
|
+
parseFASTA,
|
|
328
|
+
getAminoAcidProperties,
|
|
329
|
+
getChargeFromPrime,
|
|
330
|
+
getHydrophobicityFromPrime
|
|
339
331
|
};
|
|
@@ -1,45 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Protein Folding via Kuramoto Oscillator Dynamics
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Models protein folding as entropy minimization through coupled oscillator synchronization.
|
|
5
5
|
* Each amino acid residue is an oscillator with:
|
|
6
6
|
* - Natural frequency derived from its prime value
|
|
7
7
|
* - Coupling strength from contact propensity (hydrophobic, electrostatic, resonance)
|
|
8
|
-
*
|
|
8
|
+
*
|
|
9
9
|
* Folded state = synchronized oscillators = low entropy configuration
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// Import encoding module
|
|
13
|
+
import { AMINO_ACID_PRIMES, AMINO_ACID_PROPERTIES, getChargeFromPrime, getHydrophobicityFromPrime } from './encoding.js';
|
|
13
14
|
|
|
14
|
-
//
|
|
15
|
-
|
|
15
|
+
// Golden ratio constant
|
|
16
|
+
const PHI = 1.618033988749895;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const PHI = 1.618033988749895;
|
|
33
|
-
return 1 / (1 + Math.abs(ratio - PHI));
|
|
34
|
-
};
|
|
35
|
-
shannonEntropy = (probs) => {
|
|
36
|
-
let H = 0;
|
|
37
|
-
for (const p of probs) {
|
|
38
|
-
if (p > 1e-10) H -= p * Math.log2(p);
|
|
39
|
-
}
|
|
40
|
-
return H;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
18
|
+
// Fallback implementations for standalone operation
|
|
19
|
+
const primeToFrequency = (p, base = 1, logScale = 10) => base + Math.log(p) / logScale;
|
|
20
|
+
|
|
21
|
+
const calculateResonance = (p1, p2) => {
|
|
22
|
+
const ratio = Math.max(p1, p2) / Math.min(p1, p2);
|
|
23
|
+
return 1 / (1 + Math.abs(ratio - PHI));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const shannonEntropy = (probs) => {
|
|
27
|
+
let H = 0;
|
|
28
|
+
for (const p of probs) {
|
|
29
|
+
if (p > 1e-10) H -= p * Math.log2(p);
|
|
30
|
+
}
|
|
31
|
+
return H;
|
|
32
|
+
};
|
|
43
33
|
|
|
44
34
|
/**
|
|
45
35
|
* FoldingTransform
|
|
@@ -451,4 +441,6 @@ class FoldingTransform {
|
|
|
451
441
|
}
|
|
452
442
|
}
|
|
453
443
|
|
|
454
|
-
|
|
444
|
+
export {
|
|
445
|
+
FoldingTransform
|
|
446
|
+
};
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* Standard (universal) genetic code
|
|
14
14
|
* Maps RNA codons to single-letter amino acid codes
|
|
15
15
|
*/
|
|
16
|
+
|
|
16
17
|
const STANDARD_GENETIC_CODE = {
|
|
17
18
|
// UUX codons
|
|
18
19
|
'UUU': 'F', 'UUC': 'F', // Phenylalanine
|
|
@@ -245,25 +246,20 @@ function classifyMutation(originalCodon, mutatedCodon, geneticCode = STANDARD_GE
|
|
|
245
246
|
return 'missense';
|
|
246
247
|
}
|
|
247
248
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
isStopCodon,
|
|
265
|
-
calculateGCContent,
|
|
266
|
-
calculateCAI,
|
|
267
|
-
getSynonymousCodons,
|
|
268
|
-
classifyMutation,
|
|
249
|
+
export {
|
|
250
|
+
STANDARD_GENETIC_CODE,
|
|
251
|
+
VERTEBRATE_MITOCHONDRIAL_CODE,
|
|
252
|
+
YEAST_MITOCHONDRIAL_CODE,
|
|
253
|
+
START_CODONS,
|
|
254
|
+
STOP_CODONS,
|
|
255
|
+
CODON_USAGE_ECOLI,
|
|
256
|
+
translateCodon,
|
|
257
|
+
getCodonsForAminoAcid,
|
|
258
|
+
getCodonDegeneracy,
|
|
259
|
+
isStartCodon,
|
|
260
|
+
isStopCodon,
|
|
261
|
+
calculateGCContent,
|
|
262
|
+
calculateCAI,
|
|
263
|
+
getSynonymousCodons,
|
|
264
|
+
classifyMutation
|
|
269
265
|
};
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
* - DNA computing (logic gates, strand displacement)
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
const { Backend } = require('../interface');
|
|
16
|
-
const { Hypercomplex } = require('../../core/hypercomplex');
|
|
17
|
-
const { primeToFrequency } = require('../../core/prime');
|
|
18
|
-
|
|
19
15
|
// Import all submodules
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
import { Backend } from '../interface.js';
|
|
17
|
+
import { Hypercomplex } from '../../core/hypercomplex.js';
|
|
18
|
+
import { primeToFrequency } from '../../core/prime.js';
|
|
19
|
+
import { TranscriptionOperator } from './transcription.js';
|
|
20
|
+
import { TranslationOperator } from './translation.js';
|
|
21
|
+
import { FoldingTransform } from './folding.js';
|
|
22
|
+
|
|
23
|
+
import encoding from './encoding.js';
|
|
24
|
+
import geneticCode from './genetic-code.js';
|
|
25
|
+
import dnaComputing from './dna-computing.js';
|
|
26
|
+
import binding from './binding.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* BioinformaticsBackend
|
|
@@ -487,7 +487,7 @@ class BioinformaticsBackend extends Backend {
|
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
// Export everything
|
|
490
|
-
|
|
490
|
+
export default {
|
|
491
491
|
// Main backend
|
|
492
492
|
BioinformaticsBackend,
|
|
493
493
|
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* In prime space: T(2) → U(5) substitution
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
const { NUCLEOTIDE_PRIMES, PRIME_COMPLEMENTS, PRIME_TO_NUCLEOTIDE } = require('./encoding');
|
|
11
|
-
|
|
12
10
|
/**
|
|
13
11
|
* TranscriptionOperator
|
|
14
12
|
*
|
|
15
13
|
* Transforms DNA prime sequences to RNA prime sequences.
|
|
16
14
|
* Models the biological process of transcription.
|
|
17
15
|
*/
|
|
16
|
+
import { NUCLEOTIDE_PRIMES, PRIME_COMPLEMENTS, PRIME_TO_NUCLEOTIDE } from './encoding.js';
|
|
17
|
+
|
|
18
18
|
class TranscriptionOperator {
|
|
19
19
|
constructor(options = {}) {
|
|
20
20
|
this.options = {
|
|
@@ -218,4 +218,6 @@ class TranscriptionOperator {
|
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
export {
|
|
222
|
+
TranscriptionOperator
|
|
223
|
+
};
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
* (64 codons → 21 amino acids = significant information compression)
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
const { NUCLEOTIDE_PRIMES, AMINO_ACID_PRIMES, PRIME_TO_NUCLEOTIDE } = require('./encoding');
|
|
12
|
-
const { STANDARD_GENETIC_CODE, isStartCodon, isStopCodon, translateCodon } = require('./genetic-code');
|
|
13
|
-
|
|
14
11
|
/**
|
|
15
12
|
* TranslationOperator
|
|
16
13
|
*
|
|
17
14
|
* Transforms RNA prime sequences to protein prime sequences.
|
|
18
15
|
* Models ribosome-mediated translation.
|
|
19
16
|
*/
|
|
17
|
+
import { NUCLEOTIDE_PRIMES, AMINO_ACID_PRIMES, PRIME_TO_NUCLEOTIDE } from './encoding.js';
|
|
18
|
+
import { STANDARD_GENETIC_CODE, isStartCodon, isStopCodon, translateCodon } from './genetic-code.js';
|
|
19
|
+
|
|
20
20
|
class TranslationOperator {
|
|
21
21
|
constructor(geneticCode = STANDARD_GENETIC_CODE) {
|
|
22
22
|
this.geneticCode = geneticCode;
|
|
@@ -261,4 +261,6 @@ class TranslationOperator {
|
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
|
|
264
|
+
export {
|
|
265
|
+
TranslationOperator
|
|
266
|
+
};
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
* - Holographic Key Distribution
|
|
7
7
|
* - Entropy-Sensitive Encryption
|
|
8
8
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
|
|
10
|
+
import { Backend } from '../interface.js';
|
|
11
|
+
import { Hypercomplex } from '../../core/hypercomplex.js';
|
|
12
|
+
import { GaussianInteger, primeToFrequency, isPrime, firstNPrimes, factorize } from '../../core/prime.js';
|
|
13
|
+
import { Complex, PrimeState } from '../../core/hilbert.js';
|
|
13
14
|
|
|
14
15
|
class CryptographicBackend extends Backend {
|
|
15
16
|
constructor(config) {
|
|
@@ -641,9 +642,9 @@ class HolographicKeyDistributor {
|
|
|
641
642
|
}
|
|
642
643
|
}
|
|
643
644
|
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
645
|
+
export {
|
|
646
|
+
CryptographicBackend,
|
|
647
|
+
PrimeStateKeyGenerator,
|
|
648
|
+
EntropySensitiveEncryptor,
|
|
649
|
+
HolographicKeyDistributor
|
|
649
650
|
};
|
package/backends/index.js
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Backends - exports all domain backends
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const bioinformatics = require('./bioinformatics');
|
|
5
|
+
import { Backend } from './interface.js';
|
|
6
|
+
import SemanticBackend from './semantic/index.js';
|
|
7
|
+
import CryptographicBackend from './cryptographic/index.js';
|
|
8
|
+
import ScientificBackend from './scientific/index.js';
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
import bioinformatics from './bioinformatics/index.js';
|
|
11
|
+
|
|
12
|
+
export default {
|
|
12
13
|
Backend,
|
|
13
14
|
SemanticBackend,
|
|
14
15
|
CryptographicBackend,
|
package/backends/interface.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Scientific Backend - Quantum simulation, particle physics, molecular dynamics
|
|
3
3
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
|
|
5
|
+
import { Backend } from '../interface.js';
|
|
6
|
+
import { Hypercomplex } from '../../core/hypercomplex.js';
|
|
7
|
+
import { primeToFrequency, factorize, firstNPrimes, DEFAULT_PRIMES } from '../../core/prime.js';
|
|
7
8
|
|
|
8
9
|
class ScientificBackend extends Backend {
|
|
9
10
|
constructor(config) {
|
|
@@ -269,4 +270,6 @@ class ScientificBackend extends Backend {
|
|
|
269
270
|
}
|
|
270
271
|
}
|
|
271
272
|
|
|
272
|
-
|
|
273
|
+
export {
|
|
274
|
+
ScientificBackend
|
|
275
|
+
};
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
* - Reading frames: 6 frames (3 forward + 3 reverse offsets)
|
|
11
11
|
* - Sense/Antisense: Dual representations via conjugation
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
|
|
14
|
+
import { Backend } from '../interface.js';
|
|
15
|
+
import { Hypercomplex } from '../../core/hypercomplex.js';
|
|
16
|
+
import { primeToFrequency, primeToAngle, DEFAULT_PRIMES, nthPrime } from '../../core/prime.js';
|
|
16
17
|
|
|
17
18
|
class SemanticBackend extends Backend {
|
|
18
19
|
constructor(config) {
|
|
@@ -524,4 +525,6 @@ class SemanticBackend extends Backend {
|
|
|
524
525
|
}
|
|
525
526
|
}
|
|
526
527
|
|
|
527
|
-
|
|
528
|
+
export {
|
|
529
|
+
SemanticBackend
|
|
530
|
+
};
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* A Surface represents a specific vocabulary/style mapping
|
|
12
12
|
* Multiple words can map to the same prime signature with different biases
|
|
13
13
|
*/
|
|
14
|
+
|
|
14
15
|
class Surface {
|
|
15
16
|
constructor(config = {}) {
|
|
16
17
|
this.name = config.name || 'default';
|
|
@@ -390,4 +391,4 @@ class BiasEngine {
|
|
|
390
391
|
}
|
|
391
392
|
}
|
|
392
393
|
|
|
393
|
-
|
|
394
|
+
export default { Surface, SurfaceManager, BiasEngine };
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* - Handles context-dependent vocabulary
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
import { SemanticBackend } from './index.js';
|
|
16
|
+
import { Surface, SurfaceManager, BiasEngine } from './surface.js';
|
|
17
17
|
|
|
18
18
|
class TwoLayerEngine {
|
|
19
19
|
constructor(config = {}) {
|
|
@@ -372,4 +372,6 @@ class TwoLayerEngine {
|
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
|
|
375
|
-
|
|
375
|
+
export {
|
|
376
|
+
TwoLayerEngine
|
|
377
|
+
};
|
package/core/beacon.js
CHANGED
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* - Hilbert space mapping
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
import { isPrime, primesUpTo, factorize } from './prime.js';
|
|
17
|
+
import { Complex, PrimeState } from './hilbert.js';
|
|
18
|
+
|
|
19
|
+
import crypto from 'crypto';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Resonant Fragment
|
|
@@ -726,10 +727,10 @@ class DataSummoner {
|
|
|
726
727
|
}
|
|
727
728
|
}
|
|
728
729
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
730
|
+
export {
|
|
731
|
+
ResonantFragment,
|
|
732
|
+
Beacon,
|
|
733
|
+
BeaconCache,
|
|
734
|
+
CRTReconstructor,
|
|
735
|
+
DataSummoner
|
|
735
736
|
};
|
package/core/compound.js
CHANGED
|
@@ -14,9 +14,6 @@
|
|
|
14
14
|
* Ported from symprime's CompoundBuilder system.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const { symbolDatabase, SymbolCategory } = require('./symbols');
|
|
18
|
-
const { ResonanceCalculator } = require('./resonance');
|
|
19
|
-
|
|
20
17
|
// ═══════════════════════════════════════════════════════════════════
|
|
21
18
|
// Compound Symbol Type
|
|
22
19
|
// ═══════════════════════════════════════════════════════════════════
|
|
@@ -25,6 +22,9 @@ const { ResonanceCalculator } = require('./resonance');
|
|
|
25
22
|
* A compound symbol is a combination of multiple base symbols
|
|
26
23
|
* with a unified meaning and cultural context.
|
|
27
24
|
*/
|
|
25
|
+
import { symbolDatabase, SymbolCategory } from './symbols.js';
|
|
26
|
+
import { ResonanceCalculator } from './resonance.js';
|
|
27
|
+
|
|
28
28
|
class CompoundSymbol {
|
|
29
29
|
constructor(id, components, meaning, culturalTags = []) {
|
|
30
30
|
this.id = id;
|
|
@@ -514,7 +514,7 @@ class CompoundBuilder {
|
|
|
514
514
|
// Singleton instance
|
|
515
515
|
const defaultBuilder = new CompoundBuilder();
|
|
516
516
|
|
|
517
|
-
|
|
517
|
+
export default {
|
|
518
518
|
CompoundBuilder,
|
|
519
519
|
CompoundSymbol,
|
|
520
520
|
SymbolSequence,
|