npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aleph-ai/tinyaleph

v1.0.2

Published

Prime-resonant semantic computing framework - hypercomplex algebra, oscillator dynamics, and entropy-minimizing reasoning

Readme

@aleph-ai/tinyaleph

Prime-resonant semantic computing framework

A novel computational paradigm that encodes meaning as prime number signatures, embeds them in hypercomplex space, and performs reasoning through entropy minimization and oscillator synchronization.

npm version License: MIT

Features

  • Prime Semantics: Encode concepts as unique prime number signatures
  • Hypercomplex Algebra: 16-dimensional sedenion space with non-commutative multiplication
  • Oscillator Dynamics: Kuramoto-model synchronization for coherent reasoning
  • Entropy Minimization: Reasoning as reduction of semantic uncertainty
  • Multiple Backends: Semantic (NLP), Cryptographic (hashing), Scientific (quantum-inspired)

Installation

npm install @aleph-ai/tinyaleph

Quick Start

const { createEngine, SemanticBackend } = require('@aleph-ai/tinyaleph');

// Load configuration
const config = require('@aleph-ai/tinyaleph/data.json');

// Create a semantic engine
const engine = createEngine('semantic', config);

// Process a query
const result = engine.run('What is the relationship between wisdom and truth?');

console.log('Output:', result.output);
console.log('Entropy:', result.entropy);
console.log('Steps:', result.steps.length);

Core Concepts

Prime Encoding

Every concept maps to a unique set of prime numbers:

const backend = new SemanticBackend(config);

const primes = backend.encode('love and wisdom');
console.log(primes);  // [2, 3, 5, 7, 11, ...]

Hypercomplex States

Primes embed into 16-dimensional sedenion space:

const { Hypercomplex } = require('@aleph-ai/tinyaleph');

// Create a state
const state = new Hypercomplex(16);
state.excite([2, 3, 5]);  // Excite with primes

// States support multiplication (non-commutative!)
const combined = state1.multiply(state2);
console.log(state1.multiply(state2) !== state2.multiply(state1));  // true

Entropy-Based Reasoning

Reasoning reduces entropy through semantic transforms:

const engine = createEngine('semantic', config);
const result = engine.run('Confused question here');

// Watch entropy decrease through reasoning steps
for (const step of result.steps) {
  console.log(`Step ${step.step}: entropy ${step.entropyAfter.toFixed(3)}`);
}

Backends

Semantic Backend

Natural language understanding and concept mapping:

const { SemanticBackend } = require('@aleph-ai/tinyaleph');

const backend = new SemanticBackend(config);

// Tokenize
const tokens = backend.tokenize('Love is truth');

// Encode to primes
const primes = backend.encode('Love is truth');

// Decode back
const text = backend.decode(primes);

// Compare concepts
const state1 = backend.textToOrderedState('wisdom');
const state2 = backend.textToOrderedState('knowledge');
console.log('Similarity:', state1.coherence(state2));

Cryptographic Backend

Semantic hashing and key derivation:

const { CryptographicBackend, hash, deriveKey } = require('@aleph-ai/tinyaleph');

// Quick hash
const h = hash('my secret data');

// Key derivation
const key = deriveKey('password', 'salt', 32, 10000);

// Full backend
const crypto = new CryptographicBackend(config);
const semanticHash = crypto.hash('similar meanings produce similar hashes');

Scientific Backend

Quantum-inspired computation:

const { ScientificBackend } = require('@aleph-ai/tinyaleph');

const backend = new ScientificBackend(config);

// Create quantum-like states
const state = backend.createRandomState();
const basis = backend.createBasisState(0);

// Superposition
const superposition = backend.superpose(state, 0.5, basis, 0.5);

// Measurement
const result = backend.measure(superposition, [basis]);

Physics Engine

Oscillators

const { Oscillator, OscillatorBank, KuramotoModel } = require('@aleph-ai/tinyaleph');

// Create oscillator bank
const bank = new OscillatorBank(16);

// Excite with primes
bank.excite([2, 3, 5, 7]);

// Kuramoto synchronization
const kuramoto = new KuramotoModel(bank, { coupling: 0.1 });
kuramoto.step(0.01);

console.log('Order parameter:', kuramoto.orderParameter());

Entropy and Stability

const { shannonEntropy, estimateLyapunov, stateEntropy } = require('@aleph-ai/tinyaleph');

// Calculate entropy
const entropy = stateEntropy(state);

// Estimate Lyapunov exponent for stability
const lambda = estimateLyapunov(entropyTimeSeries);
console.log('Stable:', lambda < 0);

API Overview

Main Exports

| Export | Description | |--------|-------------| | createEngine(type, config) | Create engine with backend | | AlephEngine | Unified computation engine | | SemanticBackend | Natural language processing | | CryptographicBackend | Hashing and key derivation | | ScientificBackend | Quantum-inspired computation | | Hypercomplex | Sedenion algebra | | Oscillator / OscillatorBank | Phase-amplitude oscillators | | KuramotoModel | Coupled oscillator synchronization | | hash(input) | Quick semantic hash | | deriveKey(pass, salt) | Quick key derivation |

Sub-modules

// Direct module access
const { core, physics, backends, engine } = require('@aleph-ai/tinyaleph');

// Or import sub-modules directly
const core = require('@aleph-ai/tinyaleph/core');
const physics = require('@aleph-ai/tinyaleph/physics');
const backends = require('@aleph-ai/tinyaleph/backends');
const engine = require('@aleph-ai/tinyaleph/engine');

Documentation

Full documentation is available in the docs/ directory:

  • Theory: Mathematical foundations
    • Prime semantics, hypercomplex algebra, oscillator dynamics
    • Entropy minimization, non-commutativity, temporal emergence
  • Guide: Practical tutorials
    • Quick start, semantic computing, cryptographic applications
    • Scientific computing, LLM integration, advanced topics
  • Reference: Complete API documentation
    • Core module, physics module, backends, engine

Examples

Run the included demos:

# Basic modular demo
npm run demo

# Two-layer meaning demo
npm run demo:two-layer

# Performance benchmark
npm run benchmark

# Interactive chat
npm run chat

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        AlephEngine                              │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────────┐ │
│  │ Oscillators │◄─┤   Field     │◄─┤      Transform          │ │
│  │  (Kuramoto) │  │  (Sedenion) │  │      Pipeline           │ │
│  └─────────────┘  └─────────────┘  └─────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
                              │
         ┌────────────────────┼────────────────────┐
         ▼                    ▼                    ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ SemanticBackend │ │CryptographicBack│ │ScientificBackend│
│                 │ │                 │ │                 │
│ • Tokenization  │ │ • Hash          │ │ • Quantum sim   │
│ • Prime encode  │ │ • Key derive    │ │ • Wave collapse │
│ • Transforms    │ │ • Verify        │ │ • Measurement   │
└─────────────────┘ └─────────────────┘ └─────────────────┘

Requirements

  • Node.js >= 14.0.0

License

MIT © Sebastian Schepis

Contributing

Contributions welcome! Please read the documentation in docs/ before submitting PRs.