@aleph-ai/tinyaleph 1.2.1 → 1.4.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 +609 -13
- package/backends/bioinformatics/binding.js +503 -0
- package/backends/bioinformatics/dna-computing.js +664 -0
- package/backends/bioinformatics/encoding.js +339 -0
- package/backends/bioinformatics/folding.js +454 -0
- package/backends/bioinformatics/genetic-code.js +269 -0
- package/backends/bioinformatics/index.js +522 -0
- package/backends/bioinformatics/transcription.js +221 -0
- package/backends/bioinformatics/translation.js +264 -0
- package/backends/cryptographic/index.js +455 -2
- package/backends/index.js +25 -1
- package/core/beacon.js +735 -0
- package/core/compound.js +532 -0
- package/core/crt-homology.js +1004 -0
- package/core/enochian-vocabulary.js +910 -0
- package/core/enochian.js +744 -0
- package/core/errors.js +587 -0
- package/core/hilbert.js +1105 -2
- package/core/index.js +192 -13
- package/core/inference.js +605 -0
- package/core/lambda.js +284 -33
- package/core/logger.js +350 -0
- package/core/prime.js +136 -1
- package/core/quaternion-semantics.js +623 -0
- package/core/reduction.js +391 -1
- package/core/resonance.js +245 -616
- package/core/rformer-crt.js +892 -0
- package/core/symbols/archetypes.js +478 -0
- package/core/symbols/base.js +302 -0
- package/core/symbols/elements.js +487 -0
- package/core/symbols/hieroglyphs.js +303 -0
- package/core/symbols/iching.js +471 -0
- package/core/symbols/index.js +77 -0
- package/core/symbols/tarot.js +211 -0
- package/core/symbols.js +22 -0
- package/core/topology.js +655 -0
- package/docs/README.md +54 -0
- package/docs/design/BIOINFORMATICS_BACKEND_DESIGN.md +493 -0
- package/docs/guide/06-symbolic-ai.md +370 -0
- package/docs/guide/README.md +2 -1
- package/docs/reference/05-symbolic-ai.md +570 -0
- package/docs/reference/06-bioinformatics.md +546 -0
- package/docs/reference/07-topology.md +257 -0
- package/docs/reference/08-observer.md +421 -0
- package/docs/reference/09-crt-homology.md +369 -0
- package/docs/reference/README.md +32 -2
- package/docs/theory/11-prgraph-memory.md +559 -0
- package/docs/theory/12-resonant-attention.md +661 -0
- package/modular.js +264 -4
- package/package.json +1 -1
package/modular.js
CHANGED
|
@@ -1,14 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* TinyAleph Modular - Main entry point
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* A backend-agnostic prime-based computing framework supporting:
|
|
5
5
|
* - Semantic Computing (NLP, concept mapping)
|
|
6
6
|
* - Cryptographic Applications (hashing, key derivation)
|
|
7
7
|
* - Scientific Computing (quantum simulation, particle physics)
|
|
8
|
+
*
|
|
9
|
+
* Browser-compatible utilities:
|
|
10
|
+
* - Error Handling (custom errors, error boundary, event emitter)
|
|
11
|
+
* - Logging (structured logging with console API)
|
|
12
|
+
* - Metrics (Prometheus/OTLP compatible telemetry)
|
|
13
|
+
* - Transport (WebSocket, SSE, polling)
|
|
14
|
+
* - Profiling (timers, histograms, sampling)
|
|
15
|
+
*
|
|
16
|
+
* Observer Architecture (Sentient Observer core):
|
|
17
|
+
* - SMF (Sedenion Memory Field) - 16-dimensional semantic orientation
|
|
18
|
+
* - PRSC (Prime Resonance Semantic Computation) - Kuramoto oscillator dynamics
|
|
19
|
+
* - Temporal Layer - Emergent time from coherence dynamics
|
|
20
|
+
* - Entanglement Layer - Semantic binding between concepts
|
|
21
|
+
* - Agency Layer - Attention and goal-directed behavior
|
|
22
|
+
* - Boundary Layer - Self/environment distinction (objectivity gate)
|
|
23
|
+
* - Safety Layer - Ethical constraints and emergency shutdown
|
|
8
24
|
*/
|
|
9
25
|
|
|
10
26
|
// Core mathematical foundation
|
|
11
27
|
const core = require('./core');
|
|
28
|
+
|
|
29
|
+
// Enochian Packet Layer (Section 7.4 of whitepaper)
|
|
30
|
+
const enochian = require('./core/enochian');
|
|
31
|
+
const enochianVocabulary = require('./core/enochian-vocabulary');
|
|
32
|
+
|
|
33
|
+
// Browser-compatible utilities (extracted from apps/sentient)
|
|
34
|
+
const errors = require('./core/errors');
|
|
35
|
+
const logger = require('./core/logger');
|
|
36
|
+
const metrics = require('./telemetry/metrics');
|
|
37
|
+
const transport = require('./transport');
|
|
38
|
+
const profiling = require('./profiling/primitives');
|
|
39
|
+
|
|
40
|
+
// Observer architecture (Sentient Observer core modules)
|
|
41
|
+
const smf = require('./observer/smf');
|
|
42
|
+
const prsc = require('./observer/prsc');
|
|
43
|
+
const temporal = require('./observer/temporal');
|
|
44
|
+
const entanglement = require('./observer/entanglement');
|
|
45
|
+
const agency = require('./observer/agency');
|
|
46
|
+
const boundary = require('./observer/boundary');
|
|
47
|
+
const safety = require('./observer/safety');
|
|
48
|
+
const hqe = require('./observer/hqe');
|
|
12
49
|
const {
|
|
13
50
|
Hypercomplex,
|
|
14
51
|
FANO_LINES,
|
|
@@ -69,6 +106,37 @@ const {
|
|
|
69
106
|
Oscillator,
|
|
70
107
|
OscillatorBank,
|
|
71
108
|
KuramotoModel,
|
|
109
|
+
// Extended sync models
|
|
110
|
+
NetworkKuramoto,
|
|
111
|
+
AdaptiveKuramoto,
|
|
112
|
+
SakaguchiKuramoto,
|
|
113
|
+
SmallWorldKuramoto,
|
|
114
|
+
MultiSystemCoupling,
|
|
115
|
+
createHierarchicalCoupling,
|
|
116
|
+
createPeerCoupling,
|
|
117
|
+
// Stochastic models
|
|
118
|
+
StochasticKuramoto,
|
|
119
|
+
ColoredNoiseKuramoto,
|
|
120
|
+
ThermalKuramoto,
|
|
121
|
+
gaussianRandom,
|
|
122
|
+
// Primeon Z-Ladder
|
|
123
|
+
PrimeonZLadderU,
|
|
124
|
+
createPrimeonLadder,
|
|
125
|
+
shannonEntropyNats,
|
|
126
|
+
probsOf,
|
|
127
|
+
normalizeComplex,
|
|
128
|
+
// Multi-channel ladder
|
|
129
|
+
ZChannel,
|
|
130
|
+
PrimeonZLadderMulti,
|
|
131
|
+
createMultiChannelLadder,
|
|
132
|
+
createAdiabaticSchedule,
|
|
133
|
+
// Kuramoto-coupled ladder
|
|
134
|
+
KuramotoCoupledLadder,
|
|
135
|
+
createKuramotoLadder,
|
|
136
|
+
runCollapsePressureExperiment,
|
|
137
|
+
kuramotoOrderParameter,
|
|
138
|
+
getPhase,
|
|
139
|
+
// Entropy & Information
|
|
72
140
|
shannonEntropy,
|
|
73
141
|
stateEntropy,
|
|
74
142
|
coherence,
|
|
@@ -97,7 +165,18 @@ const {
|
|
|
97
165
|
Backend,
|
|
98
166
|
SemanticBackend,
|
|
99
167
|
CryptographicBackend,
|
|
100
|
-
ScientificBackend
|
|
168
|
+
ScientificBackend,
|
|
169
|
+
BioinformaticsBackend,
|
|
170
|
+
TranscriptionOperator,
|
|
171
|
+
TranslationOperator,
|
|
172
|
+
FoldingTransform,
|
|
173
|
+
BindingAffinityCalculator,
|
|
174
|
+
MolecularDocker,
|
|
175
|
+
DNAStrand,
|
|
176
|
+
DNACircuit,
|
|
177
|
+
ANDGate,
|
|
178
|
+
ORGate,
|
|
179
|
+
NOTGate
|
|
101
180
|
} = backends;
|
|
102
181
|
|
|
103
182
|
// Unified engine
|
|
@@ -123,6 +202,12 @@ function createEngine(backendType, config = {}) {
|
|
|
123
202
|
case 'quantum':
|
|
124
203
|
backend = new ScientificBackend(config);
|
|
125
204
|
break;
|
|
205
|
+
case 'bioinformatics':
|
|
206
|
+
case 'bio':
|
|
207
|
+
case 'dna':
|
|
208
|
+
case 'protein':
|
|
209
|
+
backend = new BioinformaticsBackend(config);
|
|
210
|
+
break;
|
|
126
211
|
default:
|
|
127
212
|
throw new Error(`Unknown backend type: ${backendType}`);
|
|
128
213
|
}
|
|
@@ -156,6 +241,21 @@ module.exports = {
|
|
|
156
241
|
SemanticBackend,
|
|
157
242
|
CryptographicBackend,
|
|
158
243
|
ScientificBackend,
|
|
244
|
+
BioinformaticsBackend,
|
|
245
|
+
|
|
246
|
+
// Bioinformatics operators
|
|
247
|
+
TranscriptionOperator,
|
|
248
|
+
TranslationOperator,
|
|
249
|
+
FoldingTransform,
|
|
250
|
+
BindingAffinityCalculator,
|
|
251
|
+
MolecularDocker,
|
|
252
|
+
|
|
253
|
+
// DNA Computing
|
|
254
|
+
DNAStrand,
|
|
255
|
+
DNACircuit,
|
|
256
|
+
ANDGate,
|
|
257
|
+
ORGate,
|
|
258
|
+
NOTGate,
|
|
159
259
|
|
|
160
260
|
// Core math
|
|
161
261
|
Hypercomplex,
|
|
@@ -180,10 +280,41 @@ module.exports = {
|
|
|
180
280
|
sumOfTwoSquares,
|
|
181
281
|
DEFAULT_PRIMES,
|
|
182
282
|
|
|
183
|
-
// Physics
|
|
283
|
+
// Physics - Core oscillators
|
|
184
284
|
Oscillator,
|
|
185
285
|
OscillatorBank,
|
|
186
286
|
KuramotoModel,
|
|
287
|
+
// Extended sync models
|
|
288
|
+
NetworkKuramoto,
|
|
289
|
+
AdaptiveKuramoto,
|
|
290
|
+
SakaguchiKuramoto,
|
|
291
|
+
SmallWorldKuramoto,
|
|
292
|
+
MultiSystemCoupling,
|
|
293
|
+
createHierarchicalCoupling,
|
|
294
|
+
createPeerCoupling,
|
|
295
|
+
// Stochastic models
|
|
296
|
+
StochasticKuramoto,
|
|
297
|
+
ColoredNoiseKuramoto,
|
|
298
|
+
ThermalKuramoto,
|
|
299
|
+
gaussianRandom,
|
|
300
|
+
// Primeon Z-Ladder
|
|
301
|
+
PrimeonZLadderU,
|
|
302
|
+
createPrimeonLadder,
|
|
303
|
+
shannonEntropyNats,
|
|
304
|
+
probsOf,
|
|
305
|
+
normalizeComplex,
|
|
306
|
+
// Multi-channel ladder
|
|
307
|
+
ZChannel,
|
|
308
|
+
PrimeonZLadderMulti,
|
|
309
|
+
createMultiChannelLadder,
|
|
310
|
+
createAdiabaticSchedule,
|
|
311
|
+
// Kuramoto-coupled ladder
|
|
312
|
+
KuramotoCoupledLadder,
|
|
313
|
+
createKuramotoLadder,
|
|
314
|
+
runCollapsePressureExperiment,
|
|
315
|
+
kuramotoOrderParameter,
|
|
316
|
+
getPhase,
|
|
317
|
+
// Entropy & Information
|
|
187
318
|
shannonEntropy,
|
|
188
319
|
stateEntropy,
|
|
189
320
|
coherence,
|
|
@@ -250,5 +381,134 @@ module.exports = {
|
|
|
250
381
|
core,
|
|
251
382
|
physics,
|
|
252
383
|
backends,
|
|
253
|
-
engine
|
|
384
|
+
engine,
|
|
385
|
+
|
|
386
|
+
// Browser-compatible utilities (extracted from apps/sentient)
|
|
387
|
+
// Error handling
|
|
388
|
+
errors,
|
|
389
|
+
SimpleEventEmitter: errors.SimpleEventEmitter,
|
|
390
|
+
AlephError: errors.AlephError,
|
|
391
|
+
NetworkError: errors.NetworkError,
|
|
392
|
+
LLMError: errors.LLMError,
|
|
393
|
+
ValidationError: errors.ValidationError,
|
|
394
|
+
TimeoutError: errors.TimeoutError,
|
|
395
|
+
ErrorHandler: errors.ErrorHandler,
|
|
396
|
+
withErrorHandling: errors.withErrorHandling,
|
|
397
|
+
errorBoundary: errors.errorBoundary,
|
|
398
|
+
withTimeout: errors.withTimeout,
|
|
399
|
+
LogLevel: errors.LogLevel,
|
|
400
|
+
ErrorCategory: errors.ErrorCategory,
|
|
401
|
+
|
|
402
|
+
// Logging
|
|
403
|
+
logger,
|
|
404
|
+
Logger: logger.Logger,
|
|
405
|
+
createLogger: logger.createLogger,
|
|
406
|
+
|
|
407
|
+
// Metrics/Telemetry
|
|
408
|
+
metrics,
|
|
409
|
+
Counter: metrics.Counter,
|
|
410
|
+
Gauge: metrics.Gauge,
|
|
411
|
+
Histogram: metrics.Histogram,
|
|
412
|
+
Summary: metrics.Summary,
|
|
413
|
+
MetricRegistry: metrics.MetricRegistry,
|
|
414
|
+
MetricType: metrics.MetricType,
|
|
415
|
+
|
|
416
|
+
// Transport
|
|
417
|
+
transport,
|
|
418
|
+
Transport: transport.Transport,
|
|
419
|
+
WebSocketTransport: transport.WebSocketTransport,
|
|
420
|
+
SSETransport: transport.SSETransport,
|
|
421
|
+
MemoryTransport: transport.MemoryTransport,
|
|
422
|
+
PollingTransport: transport.PollingTransport,
|
|
423
|
+
TransportManager: transport.TransportManager,
|
|
424
|
+
TransportState: transport.TransportState,
|
|
425
|
+
|
|
426
|
+
// Profiling primitives
|
|
427
|
+
profiling,
|
|
428
|
+
RingBuffer: profiling.RingBuffer,
|
|
429
|
+
Timer: profiling.Timer,
|
|
430
|
+
Sampler: profiling.Sampler,
|
|
431
|
+
RateCalculator: profiling.RateCalculator,
|
|
432
|
+
MovingAverage: profiling.MovingAverage,
|
|
433
|
+
Profiler: profiling.Profiler,
|
|
434
|
+
hrtime: profiling.hrtime,
|
|
435
|
+
hrtimeNs: profiling.hrtimeNs,
|
|
436
|
+
|
|
437
|
+
// Observer Architecture (Sentient Observer core)
|
|
438
|
+
// SMF - Sedenion Memory Field
|
|
439
|
+
smf,
|
|
440
|
+
SedenionMemoryField: smf.SedenionMemoryField,
|
|
441
|
+
SMF_AXES: smf.SMF_AXES,
|
|
442
|
+
AXIS_INDEX: smf.AXIS_INDEX,
|
|
443
|
+
SMF_CODEBOOK: smf.SMF_CODEBOOK,
|
|
444
|
+
CODEBOOK_SIZE: smf.CODEBOOK_SIZE,
|
|
445
|
+
nearestCodebookAttractor: smf.nearestCodebookAttractor,
|
|
446
|
+
codebookTunnel: smf.codebookTunnel,
|
|
447
|
+
getTunnelingCandidates: smf.getTunnelingCandidates,
|
|
448
|
+
|
|
449
|
+
// PRSC - Prime Resonance Semantic Computation
|
|
450
|
+
prsc,
|
|
451
|
+
PRSCLayer: prsc.PRSCLayer,
|
|
452
|
+
PrimeOscillator: prsc.PrimeOscillator,
|
|
453
|
+
EntanglementDetector: prsc.EntanglementDetector,
|
|
454
|
+
|
|
455
|
+
// Temporal Layer
|
|
456
|
+
temporal,
|
|
457
|
+
TemporalLayer: temporal.TemporalLayer,
|
|
458
|
+
Moment: temporal.Moment,
|
|
459
|
+
TemporalPatternDetector: temporal.TemporalPatternDetector,
|
|
460
|
+
|
|
461
|
+
// Entanglement Layer
|
|
462
|
+
entanglement,
|
|
463
|
+
EntanglementLayer: entanglement.EntanglementLayer,
|
|
464
|
+
EntangledPair: entanglement.EntangledPair,
|
|
465
|
+
Phrase: entanglement.Phrase,
|
|
466
|
+
|
|
467
|
+
// Agency Layer
|
|
468
|
+
agency,
|
|
469
|
+
AgencyLayer: agency.AgencyLayer,
|
|
470
|
+
AttentionFocus: agency.AttentionFocus,
|
|
471
|
+
Goal: agency.Goal,
|
|
472
|
+
Action: agency.Action,
|
|
473
|
+
|
|
474
|
+
// Boundary Layer
|
|
475
|
+
boundary,
|
|
476
|
+
BoundaryLayer: boundary.BoundaryLayer,
|
|
477
|
+
SensoryChannel: boundary.SensoryChannel,
|
|
478
|
+
MotorChannel: boundary.MotorChannel,
|
|
479
|
+
EnvironmentalModel: boundary.EnvironmentalModel,
|
|
480
|
+
SelfModel: boundary.SelfModel,
|
|
481
|
+
ObjectivityGate: boundary.ObjectivityGate,
|
|
482
|
+
|
|
483
|
+
// Safety Layer
|
|
484
|
+
safety,
|
|
485
|
+
SafetyLayer: safety.SafetyLayer,
|
|
486
|
+
SafetyConstraint: safety.SafetyConstraint,
|
|
487
|
+
ViolationEvent: safety.ViolationEvent,
|
|
488
|
+
SafetyMonitor: safety.SafetyMonitor,
|
|
489
|
+
|
|
490
|
+
// HQE - Holographic Quantum Encoding (discrete.pdf equations 12-15)
|
|
491
|
+
hqe,
|
|
492
|
+
TickGate: hqe.TickGate,
|
|
493
|
+
StabilizationController: hqe.StabilizationController,
|
|
494
|
+
HolographicEncoder: hqe.HolographicEncoder,
|
|
495
|
+
HolographicMemory: hqe.HolographicMemory,
|
|
496
|
+
HolographicSimilarity: hqe.HolographicSimilarity,
|
|
497
|
+
|
|
498
|
+
// Enochian Packet Layer (Section 7.4 - prime-indexed twist encoding)
|
|
499
|
+
enochian,
|
|
500
|
+
enochianVocabulary,
|
|
501
|
+
ENOCHIAN_ALPHABET: enochianVocabulary.ENOCHIAN_ALPHABET,
|
|
502
|
+
ENOCHIAN_LETTER_PRIMES: enochianVocabulary.ENOCHIAN_LETTER_PRIMES,
|
|
503
|
+
ENOCHIAN_VOCABULARY: enochianVocabulary.ENOCHIAN_VOCABULARY,
|
|
504
|
+
ENOCHIAN_CALLS: enochianVocabulary.ENOCHIAN_CALLS,
|
|
505
|
+
SedenionElement: enochianVocabulary.SedenionElement,
|
|
506
|
+
TwistOperator: enochianVocabulary.TwistOperator,
|
|
507
|
+
EnochianWord: enochianVocabulary.EnochianWord,
|
|
508
|
+
EnochianCall: enochianVocabulary.EnochianCall,
|
|
509
|
+
EnochianPacket: enochian.EnochianPacket,
|
|
510
|
+
EnochianEncoder: enochian.EnochianEncoder,
|
|
511
|
+
EnochianDecoder: enochian.EnochianDecoder,
|
|
512
|
+
EnhancedEnochianEncoder: enochian.EnhancedEnochianEncoder,
|
|
513
|
+
EnhancedEnochianDecoder: enochian.EnhancedEnochianDecoder
|
|
254
514
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aleph-ai/tinyaleph",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Prime-resonant semantic computing framework - hypercomplex algebra, oscillator dynamics, and entropy-minimizing reasoning",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|