ruvector 0.1.84 ā 0.1.85
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/bin/cli.js +238 -0
- package/dist/core/index.d.ts +2 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +4 -1
- package/dist/core/neural-embeddings.d.ts +320 -0
- package/dist/core/neural-embeddings.d.ts.map +1 -0
- package/dist/core/neural-embeddings.js +881 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -2213,6 +2213,244 @@ embedCmd
|
|
|
2213
2213
|
}
|
|
2214
2214
|
});
|
|
2215
2215
|
|
|
2216
|
+
embedCmd
|
|
2217
|
+
.command('neural')
|
|
2218
|
+
.description('Neural embedding substrate (frontier AI concepts)')
|
|
2219
|
+
.option('--health', 'Show neural substrate health')
|
|
2220
|
+
.option('--consolidate', 'Run memory consolidation (like sleep)')
|
|
2221
|
+
.option('--calibrate', 'Calibrate coherence baseline')
|
|
2222
|
+
.option('--swarm-status', 'Show swarm coordination status')
|
|
2223
|
+
.option('--drift-stats', 'Show semantic drift statistics')
|
|
2224
|
+
.option('--memory-stats', 'Show memory physics statistics')
|
|
2225
|
+
.option('--demo', 'Run interactive neural demo')
|
|
2226
|
+
.option('--dimension <n>', 'Embedding dimension', '384')
|
|
2227
|
+
.action(async (opts) => {
|
|
2228
|
+
try {
|
|
2229
|
+
const { NeuralSubstrate } = require('../dist/core/neural-embeddings.js');
|
|
2230
|
+
const { initOnnxEmbedder, embed } = require('../dist/core/onnx-embedder.js');
|
|
2231
|
+
|
|
2232
|
+
const dimension = parseInt(opts.dimension) || 384;
|
|
2233
|
+
const substrate = new NeuralSubstrate({ dimension });
|
|
2234
|
+
|
|
2235
|
+
if (opts.demo) {
|
|
2236
|
+
console.log(chalk.cyan('\nš§ Neural Embedding Substrate Demo\n'));
|
|
2237
|
+
console.log(chalk.dim('Frontier AI concepts: drift detection, memory physics, swarm coordination\n'));
|
|
2238
|
+
|
|
2239
|
+
// Initialize ONNX for real embeddings
|
|
2240
|
+
await initOnnxEmbedder();
|
|
2241
|
+
|
|
2242
|
+
console.log(chalk.yellow('1. Semantic Drift Detection'));
|
|
2243
|
+
console.log(chalk.dim(' Observing embeddings and detecting semantic movement...\n'));
|
|
2244
|
+
|
|
2245
|
+
const texts = [
|
|
2246
|
+
'Machine learning optimizes neural networks',
|
|
2247
|
+
'Deep learning uses backpropagation',
|
|
2248
|
+
'AI models learn from data patterns',
|
|
2249
|
+
'Quantum computing is completely different', // Should trigger drift
|
|
2250
|
+
];
|
|
2251
|
+
|
|
2252
|
+
for (const text of texts) {
|
|
2253
|
+
const result = await embed(text);
|
|
2254
|
+
const driftEvent = substrate.drift.observe(result.embedding, 'demo');
|
|
2255
|
+
const symbol = driftEvent?.category === 'critical' ? 'šØ' :
|
|
2256
|
+
driftEvent?.category === 'warning' ? 'ā ļø' : 'ā';
|
|
2257
|
+
console.log(chalk.dim(` ${symbol} "${text.slice(0, 40)}..." ā drift: ${driftEvent?.magnitude?.toFixed(3) || '0.000'}`));
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
console.log(chalk.yellow('\n2. Memory Physics (Hippocampal Dynamics)'));
|
|
2261
|
+
console.log(chalk.dim(' Encoding memories with strength, decay, and consolidation...\n'));
|
|
2262
|
+
|
|
2263
|
+
const memories = [
|
|
2264
|
+
{ id: 'mem1', text: 'Vector databases store embeddings' },
|
|
2265
|
+
{ id: 'mem2', text: 'HNSW enables fast nearest neighbor search' },
|
|
2266
|
+
{ id: 'mem3', text: 'Cosine similarity measures semantic closeness' },
|
|
2267
|
+
];
|
|
2268
|
+
|
|
2269
|
+
for (const mem of memories) {
|
|
2270
|
+
const result = await embed(mem.text);
|
|
2271
|
+
const entry = substrate.memory.encode(mem.id, result.embedding, mem.text);
|
|
2272
|
+
console.log(chalk.dim(` š Encoded "${mem.id}": strength=${entry.strength.toFixed(2)}, interference=${entry.interference.toFixed(2)}`));
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
// Query memory
|
|
2276
|
+
const queryText = 'How do vector databases work?';
|
|
2277
|
+
const queryEmb = await embed(queryText);
|
|
2278
|
+
const recalled = substrate.memory.recall(queryEmb.embedding, 2);
|
|
2279
|
+
console.log(chalk.dim(`\n š Query: "${queryText}"`));
|
|
2280
|
+
console.log(chalk.dim(` š Recalled: ${recalled.map(m => m.id).join(', ')}`));
|
|
2281
|
+
|
|
2282
|
+
console.log(chalk.yellow('\n3. Agent State Machine (Geometric State)'));
|
|
2283
|
+
console.log(chalk.dim(' Managing agent state as movement through embedding space...\n'));
|
|
2284
|
+
|
|
2285
|
+
// Define mode regions
|
|
2286
|
+
substrate.state.defineMode('research', queryEmb.embedding, 0.5);
|
|
2287
|
+
const codeEmb = await embed('Write code and debug programs');
|
|
2288
|
+
substrate.state.defineMode('coding', codeEmb.embedding, 0.5);
|
|
2289
|
+
|
|
2290
|
+
// Update agent state
|
|
2291
|
+
const agent1State = substrate.state.updateAgent('agent-1', queryEmb.embedding);
|
|
2292
|
+
console.log(chalk.dim(` š¤ agent-1 mode: ${agent1State.mode}, energy: ${agent1State.energy.toFixed(2)}`));
|
|
2293
|
+
|
|
2294
|
+
const agent2State = substrate.state.updateAgent('agent-2', codeEmb.embedding);
|
|
2295
|
+
console.log(chalk.dim(` š¤ agent-2 mode: ${agent2State.mode}, energy: ${agent2State.energy.toFixed(2)}`));
|
|
2296
|
+
|
|
2297
|
+
console.log(chalk.yellow('\n4. Swarm Coordination'));
|
|
2298
|
+
console.log(chalk.dim(' Multi-agent coordination through shared embedding geometry...\n'));
|
|
2299
|
+
|
|
2300
|
+
substrate.swarm.register('researcher', queryEmb.embedding, 'research');
|
|
2301
|
+
substrate.swarm.register('coder', codeEmb.embedding, 'development');
|
|
2302
|
+
const reviewEmb = await embed('Review code and check quality');
|
|
2303
|
+
substrate.swarm.register('reviewer', reviewEmb.embedding, 'review');
|
|
2304
|
+
|
|
2305
|
+
const coherence = substrate.swarm.getCoherence();
|
|
2306
|
+
console.log(chalk.dim(` š Swarm coherence: ${(coherence * 100).toFixed(1)}%`));
|
|
2307
|
+
|
|
2308
|
+
const collaborators = substrate.swarm.findCollaborators('researcher', 2);
|
|
2309
|
+
console.log(chalk.dim(` š¤ Collaborators for researcher: ${collaborators.map(c => c.id).join(', ')}`));
|
|
2310
|
+
|
|
2311
|
+
console.log(chalk.yellow('\n5. Coherence Monitoring (Safety)'));
|
|
2312
|
+
console.log(chalk.dim(' Detecting degradation, poisoning, misalignment...\n'));
|
|
2313
|
+
|
|
2314
|
+
try {
|
|
2315
|
+
substrate.calibrate();
|
|
2316
|
+
const report = substrate.coherence.report();
|
|
2317
|
+
console.log(chalk.dim(` š Overall coherence: ${(report.overallScore * 100).toFixed(1)}%`));
|
|
2318
|
+
console.log(chalk.dim(` š Stability: ${(report.stabilityScore * 100).toFixed(1)}%`));
|
|
2319
|
+
console.log(chalk.dim(` š Alignment: ${(report.alignmentScore * 100).toFixed(1)}%`));
|
|
2320
|
+
} catch {
|
|
2321
|
+
console.log(chalk.dim(' ā¹ļø Need more observations to calibrate coherence'));
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
console.log(chalk.cyan('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā'));
|
|
2325
|
+
console.log(chalk.bold(' Neural Substrate: Embeddings as Synthetic Nervous System'));
|
|
2326
|
+
console.log(chalk.cyan('āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā\n'));
|
|
2327
|
+
|
|
2328
|
+
console.log(chalk.dim('Components:'));
|
|
2329
|
+
console.log(chalk.dim(' ⢠SemanticDriftDetector - Control signals, reflex triggers'));
|
|
2330
|
+
console.log(chalk.dim(' ⢠MemoryPhysics - Forgetting, interference, consolidation'));
|
|
2331
|
+
console.log(chalk.dim(' ⢠EmbeddingStateMachine - Agent state via geometry'));
|
|
2332
|
+
console.log(chalk.dim(' ⢠SwarmCoordinator - Multi-agent coordination'));
|
|
2333
|
+
console.log(chalk.dim(' ⢠CoherenceMonitor - Safety/alignment detection'));
|
|
2334
|
+
console.log(chalk.dim(' ⢠NeuralSubstrate - Unified nervous system layer'));
|
|
2335
|
+
console.log('');
|
|
2336
|
+
return;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
if (opts.health) {
|
|
2340
|
+
const health = substrate.health();
|
|
2341
|
+
console.log(chalk.cyan('\nš§ Neural Substrate Health\n'));
|
|
2342
|
+
|
|
2343
|
+
console.log(chalk.yellow('Drift Detection:'));
|
|
2344
|
+
console.log(chalk.dim(` Current drift: ${health.driftStats.currentDrift.toFixed(4)}`));
|
|
2345
|
+
console.log(chalk.dim(` Velocity: ${health.driftStats.velocity.toFixed(4)}/s`));
|
|
2346
|
+
console.log(chalk.dim(` Critical events: ${health.driftStats.criticalEvents}`));
|
|
2347
|
+
console.log(chalk.dim(` Warning events: ${health.driftStats.warningEvents}`));
|
|
2348
|
+
|
|
2349
|
+
console.log(chalk.yellow('\nMemory Physics:'));
|
|
2350
|
+
console.log(chalk.dim(` Total memories: ${health.memoryStats.totalMemories}`));
|
|
2351
|
+
console.log(chalk.dim(` Avg strength: ${health.memoryStats.avgStrength.toFixed(3)}`));
|
|
2352
|
+
console.log(chalk.dim(` Avg consolidation: ${health.memoryStats.avgConsolidation.toFixed(3)}`));
|
|
2353
|
+
console.log(chalk.dim(` Avg interference: ${health.memoryStats.avgInterference.toFixed(3)}`));
|
|
2354
|
+
|
|
2355
|
+
console.log(chalk.yellow('\nSwarm Coordination:'));
|
|
2356
|
+
console.log(chalk.dim(` Coherence: ${(health.swarmCoherence * 100).toFixed(1)}%`));
|
|
2357
|
+
|
|
2358
|
+
console.log(chalk.yellow('\nCoherence Report:'));
|
|
2359
|
+
console.log(chalk.dim(` Overall: ${(health.coherenceReport.overallScore * 100).toFixed(1)}%`));
|
|
2360
|
+
console.log(chalk.dim(` Drift: ${(health.coherenceReport.driftScore * 100).toFixed(1)}%`));
|
|
2361
|
+
console.log(chalk.dim(` Stability: ${(health.coherenceReport.stabilityScore * 100).toFixed(1)}%`));
|
|
2362
|
+
console.log(chalk.dim(` Alignment: ${(health.coherenceReport.alignmentScore * 100).toFixed(1)}%`));
|
|
2363
|
+
|
|
2364
|
+
if (health.coherenceReport.anomalies.length > 0) {
|
|
2365
|
+
console.log(chalk.yellow('\nAnomalies:'));
|
|
2366
|
+
for (const a of health.coherenceReport.anomalies) {
|
|
2367
|
+
console.log(chalk.red(` ā ļø ${a.type}: ${a.description} (severity: ${a.severity.toFixed(2)})`));
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
console.log('');
|
|
2371
|
+
return;
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
if (opts.consolidate) {
|
|
2375
|
+
console.log(chalk.yellow('Running memory consolidation...'));
|
|
2376
|
+
const result = substrate.consolidate();
|
|
2377
|
+
console.log(chalk.green(`ā Consolidated: ${result.consolidated} memories`));
|
|
2378
|
+
console.log(chalk.dim(` Forgotten: ${result.forgotten} weak memories`));
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
if (opts.calibrate) {
|
|
2383
|
+
try {
|
|
2384
|
+
substrate.calibrate();
|
|
2385
|
+
console.log(chalk.green('ā Coherence baseline calibrated'));
|
|
2386
|
+
} catch (e) {
|
|
2387
|
+
console.log(chalk.yellow('Need more observations to calibrate'));
|
|
2388
|
+
console.log(chalk.dim('Run --demo first to populate the substrate'));
|
|
2389
|
+
}
|
|
2390
|
+
return;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
if (opts.driftStats) {
|
|
2394
|
+
const stats = substrate.drift.getStats();
|
|
2395
|
+
console.log(chalk.cyan('\nš Semantic Drift Statistics\n'));
|
|
2396
|
+
console.log(chalk.dim(`Current drift: ${stats.currentDrift.toFixed(4)}`));
|
|
2397
|
+
console.log(chalk.dim(`Velocity: ${stats.velocity.toFixed(4)} drift/s`));
|
|
2398
|
+
console.log(chalk.dim(`Critical events: ${stats.criticalEvents}`));
|
|
2399
|
+
console.log(chalk.dim(`Warning events: ${stats.warningEvents}`));
|
|
2400
|
+
console.log(chalk.dim(`History size: ${stats.historySize}`));
|
|
2401
|
+
console.log('');
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
if (opts.memoryStats) {
|
|
2406
|
+
const stats = substrate.memory.getStats();
|
|
2407
|
+
console.log(chalk.cyan('\nš Memory Physics Statistics\n'));
|
|
2408
|
+
console.log(chalk.dim(`Total memories: ${stats.totalMemories}`));
|
|
2409
|
+
console.log(chalk.dim(`Average strength: ${stats.avgStrength.toFixed(3)}`));
|
|
2410
|
+
console.log(chalk.dim(`Average consolidation: ${stats.avgConsolidation.toFixed(3)}`));
|
|
2411
|
+
console.log(chalk.dim(`Average interference: ${stats.avgInterference.toFixed(3)}`));
|
|
2412
|
+
console.log('');
|
|
2413
|
+
return;
|
|
2414
|
+
}
|
|
2415
|
+
|
|
2416
|
+
if (opts.swarmStatus) {
|
|
2417
|
+
const coherence = substrate.swarm.getCoherence();
|
|
2418
|
+
const clusters = substrate.swarm.detectClusters(0.7);
|
|
2419
|
+
console.log(chalk.cyan('\nš Swarm Coordination Status\n'));
|
|
2420
|
+
console.log(chalk.dim(`Coherence: ${(coherence * 100).toFixed(1)}%`));
|
|
2421
|
+
console.log(chalk.dim(`Clusters detected: ${clusters.size}`));
|
|
2422
|
+
for (const [leader, members] of clusters) {
|
|
2423
|
+
console.log(chalk.dim(` Cluster ${leader}: ${members.join(', ')}`));
|
|
2424
|
+
}
|
|
2425
|
+
console.log('');
|
|
2426
|
+
return;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
// Default: show help
|
|
2430
|
+
console.log(chalk.cyan('\nš§ Neural Embedding Substrate\n'));
|
|
2431
|
+
console.log(chalk.dim('Frontier AI concepts treating embeddings as a synthetic nervous system.\n'));
|
|
2432
|
+
console.log(chalk.yellow('Commands:'));
|
|
2433
|
+
console.log(chalk.dim(' --demo Run interactive neural demo'));
|
|
2434
|
+
console.log(chalk.dim(' --health Show neural substrate health'));
|
|
2435
|
+
console.log(chalk.dim(' --consolidate Run memory consolidation (like sleep)'));
|
|
2436
|
+
console.log(chalk.dim(' --calibrate Calibrate coherence baseline'));
|
|
2437
|
+
console.log(chalk.dim(' --drift-stats Show semantic drift statistics'));
|
|
2438
|
+
console.log(chalk.dim(' --memory-stats Show memory physics statistics'));
|
|
2439
|
+
console.log(chalk.dim(' --swarm-status Show swarm coordination status'));
|
|
2440
|
+
console.log('');
|
|
2441
|
+
console.log(chalk.yellow('Components:'));
|
|
2442
|
+
console.log(chalk.dim(' ⢠SemanticDriftDetector - Embeddings as control signals'));
|
|
2443
|
+
console.log(chalk.dim(' ⢠MemoryPhysics - Hippocampal memory dynamics'));
|
|
2444
|
+
console.log(chalk.dim(' ⢠EmbeddingStateMachine - Agent state via geometry'));
|
|
2445
|
+
console.log(chalk.dim(' ⢠SwarmCoordinator - Multi-agent coordination'));
|
|
2446
|
+
console.log(chalk.dim(' ⢠CoherenceMonitor - Safety/alignment detection'));
|
|
2447
|
+
console.log('');
|
|
2448
|
+
} catch (e) {
|
|
2449
|
+
console.error(chalk.red('Error:'), e.message);
|
|
2450
|
+
if (e.stack) console.error(chalk.dim(e.stack));
|
|
2451
|
+
}
|
|
2452
|
+
});
|
|
2453
|
+
|
|
2216
2454
|
// =============================================================================
|
|
2217
2455
|
// Demo Command - Interactive tutorial
|
|
2218
2456
|
// =============================================================================
|
package/dist/core/index.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './graph-algorithms';
|
|
|
23
23
|
export * from './tensor-compress';
|
|
24
24
|
export * from './learning-engine';
|
|
25
25
|
export * from './adaptive-embedder';
|
|
26
|
+
export * from './neural-embeddings';
|
|
26
27
|
export * from '../analysis';
|
|
27
28
|
export { default as gnnWrapper } from './gnn-wrapper';
|
|
28
29
|
export { default as attentionFallbacks } from './attention-fallbacks';
|
|
@@ -41,4 +42,5 @@ export { CodeParser as ASTParser } from './ast-parser';
|
|
|
41
42
|
export { default as TensorCompress } from './tensor-compress';
|
|
42
43
|
export { default as LearningEngine } from './learning-engine';
|
|
43
44
|
export { default as AdaptiveEmbedder } from './adaptive-embedder';
|
|
45
|
+
export { default as NeuralSubstrate } from './neural-embeddings';
|
|
44
46
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AAGpC,cAAc,aAAa,CAAC;AAG5B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,O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AAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/core/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.AdaptiveEmbedder = exports.LearningEngine = exports.TensorCompress = exports.ASTParser = exports.CodeParser = exports.RuvectorCluster = exports.CodeGraph = exports.SemanticRouter = exports.ExtendedWorkerPool = exports.ParallelIntelligence = exports.OptimizedOnnxEmbedder = exports.OnnxEmbedder = exports.IntelligenceEngine = exports.Sona = exports.agentdbFast = exports.attentionFallbacks = exports.gnnWrapper = void 0;
|
|
26
|
+
exports.NeuralSubstrate = exports.AdaptiveEmbedder = exports.LearningEngine = exports.TensorCompress = exports.ASTParser = exports.CodeParser = exports.RuvectorCluster = exports.CodeGraph = exports.SemanticRouter = exports.ExtendedWorkerPool = exports.ParallelIntelligence = exports.OptimizedOnnxEmbedder = exports.OnnxEmbedder = exports.IntelligenceEngine = exports.Sona = exports.agentdbFast = exports.attentionFallbacks = exports.gnnWrapper = void 0;
|
|
27
27
|
__exportStar(require("./gnn-wrapper"), exports);
|
|
28
28
|
__exportStar(require("./attention-fallbacks"), exports);
|
|
29
29
|
__exportStar(require("./agentdb-fast"), exports);
|
|
@@ -43,6 +43,7 @@ __exportStar(require("./graph-algorithms"), exports);
|
|
|
43
43
|
__exportStar(require("./tensor-compress"), exports);
|
|
44
44
|
__exportStar(require("./learning-engine"), exports);
|
|
45
45
|
__exportStar(require("./adaptive-embedder"), exports);
|
|
46
|
+
__exportStar(require("./neural-embeddings"), exports);
|
|
46
47
|
// Analysis module (consolidated security, complexity, patterns)
|
|
47
48
|
__exportStar(require("../analysis"), exports);
|
|
48
49
|
// Re-export default objects for convenience
|
|
@@ -82,3 +83,5 @@ var learning_engine_1 = require("./learning-engine");
|
|
|
82
83
|
Object.defineProperty(exports, "LearningEngine", { enumerable: true, get: function () { return __importDefault(learning_engine_1).default; } });
|
|
83
84
|
var adaptive_embedder_1 = require("./adaptive-embedder");
|
|
84
85
|
Object.defineProperty(exports, "AdaptiveEmbedder", { enumerable: true, get: function () { return __importDefault(adaptive_embedder_1).default; } });
|
|
86
|
+
var neural_embeddings_1 = require("./neural-embeddings");
|
|
87
|
+
Object.defineProperty(exports, "NeuralSubstrate", { enumerable: true, get: function () { return __importDefault(neural_embeddings_1).default; } });
|
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Neural Embedding System - Frontier Embedding Intelligence
|
|
3
|
+
*
|
|
4
|
+
* Implements late-2025 research concepts treating embeddings as:
|
|
5
|
+
* 1. CONTROL SIGNALS - Semantic drift detection, reflex triggers
|
|
6
|
+
* 2. MEMORY PHYSICS - Forgetting curves, interference, consolidation
|
|
7
|
+
* 3. PROGRAM STATE - Agent state management via geometry
|
|
8
|
+
* 4. COORDINATION PRIMITIVES - Multi-agent swarm alignment
|
|
9
|
+
* 5. SAFETY MONITORS - Coherence detection, misalignment alerts
|
|
10
|
+
* 6. NEURAL SUBSTRATE - Synthetic nervous system layer
|
|
11
|
+
*
|
|
12
|
+
* Based on:
|
|
13
|
+
* - TinyTE (EMNLP 2025): Embedding-layer steering
|
|
14
|
+
* - DoRA (ICML 2024): Magnitude-direction decomposition
|
|
15
|
+
* - S-LoRA/Punica: Multi-adapter serving patterns
|
|
16
|
+
* - MMTEB: Multilingual embedding benchmarks
|
|
17
|
+
*/
|
|
18
|
+
export interface DriftEvent {
|
|
19
|
+
timestamp: number;
|
|
20
|
+
magnitude: number;
|
|
21
|
+
direction: Float32Array;
|
|
22
|
+
category: 'normal' | 'warning' | 'critical';
|
|
23
|
+
source?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface NeuralMemoryEntry {
|
|
26
|
+
id: string;
|
|
27
|
+
embedding: Float32Array;
|
|
28
|
+
content: string;
|
|
29
|
+
strength: number;
|
|
30
|
+
lastAccess: number;
|
|
31
|
+
accessCount: number;
|
|
32
|
+
consolidationLevel: number;
|
|
33
|
+
interference: number;
|
|
34
|
+
}
|
|
35
|
+
export interface AgentState {
|
|
36
|
+
id: string;
|
|
37
|
+
position: Float32Array;
|
|
38
|
+
velocity: Float32Array;
|
|
39
|
+
attention: Float32Array;
|
|
40
|
+
energy: number;
|
|
41
|
+
mode: string;
|
|
42
|
+
}
|
|
43
|
+
export interface CoherenceReport {
|
|
44
|
+
timestamp: number;
|
|
45
|
+
overallScore: number;
|
|
46
|
+
driftScore: number;
|
|
47
|
+
stabilityScore: number;
|
|
48
|
+
alignmentScore: number;
|
|
49
|
+
anomalies: Array<{
|
|
50
|
+
type: string;
|
|
51
|
+
severity: number;
|
|
52
|
+
description: string;
|
|
53
|
+
}>;
|
|
54
|
+
}
|
|
55
|
+
export interface NeuralConfig {
|
|
56
|
+
dimension?: number;
|
|
57
|
+
driftThreshold?: number;
|
|
58
|
+
driftWindowMs?: number;
|
|
59
|
+
memoryDecayRate?: number;
|
|
60
|
+
interferenceThreshold?: number;
|
|
61
|
+
consolidationRate?: number;
|
|
62
|
+
reflexLatencyMs?: number;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Detects semantic drift and triggers reflexes based on embedding movement.
|
|
66
|
+
* Instead of asking "what is similar", asks "how far did we move".
|
|
67
|
+
*/
|
|
68
|
+
export declare class SemanticDriftDetector {
|
|
69
|
+
private baseline;
|
|
70
|
+
private history;
|
|
71
|
+
private driftEvents;
|
|
72
|
+
private config;
|
|
73
|
+
private reflexes;
|
|
74
|
+
constructor(config?: NeuralConfig);
|
|
75
|
+
/**
|
|
76
|
+
* Set the baseline embedding (reference point)
|
|
77
|
+
*/
|
|
78
|
+
setBaseline(embedding: number[] | Float32Array): void;
|
|
79
|
+
/**
|
|
80
|
+
* Observe a new embedding and detect drift
|
|
81
|
+
*/
|
|
82
|
+
observe(embedding: number[] | Float32Array, source?: string): DriftEvent | null;
|
|
83
|
+
/**
|
|
84
|
+
* Calculate drift between two embeddings
|
|
85
|
+
*/
|
|
86
|
+
private calculateDrift;
|
|
87
|
+
/**
|
|
88
|
+
* Register a reflex callback for drift events
|
|
89
|
+
*/
|
|
90
|
+
registerReflex(name: string, callback: (event: DriftEvent) => void): void;
|
|
91
|
+
/**
|
|
92
|
+
* Trigger registered reflexes
|
|
93
|
+
*/
|
|
94
|
+
private triggerReflexes;
|
|
95
|
+
/**
|
|
96
|
+
* Get recent drift velocity (rate of change)
|
|
97
|
+
*/
|
|
98
|
+
getVelocity(): number;
|
|
99
|
+
/**
|
|
100
|
+
* Get drift statistics
|
|
101
|
+
*/
|
|
102
|
+
getStats(): {
|
|
103
|
+
currentDrift: number;
|
|
104
|
+
velocity: number;
|
|
105
|
+
criticalEvents: number;
|
|
106
|
+
warningEvents: number;
|
|
107
|
+
historySize: number;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Reset baseline to current position
|
|
111
|
+
*/
|
|
112
|
+
recenter(): void;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Implements hippocampal-like memory dynamics in embedding space.
|
|
116
|
+
* Memory strength decays, similar memories interfere, consolidation strengthens.
|
|
117
|
+
*/
|
|
118
|
+
export declare class MemoryPhysics {
|
|
119
|
+
private memories;
|
|
120
|
+
private config;
|
|
121
|
+
private lastUpdate;
|
|
122
|
+
constructor(config?: NeuralConfig);
|
|
123
|
+
/**
|
|
124
|
+
* Encode a new memory
|
|
125
|
+
*/
|
|
126
|
+
encode(id: string, embedding: number[] | Float32Array, content: string): NeuralMemoryEntry;
|
|
127
|
+
/**
|
|
128
|
+
* Recall memories similar to a query (strengthens accessed memories)
|
|
129
|
+
*/
|
|
130
|
+
recall(query: number[] | Float32Array, k?: number): NeuralMemoryEntry[];
|
|
131
|
+
/**
|
|
132
|
+
* Apply time-based decay to all memories
|
|
133
|
+
*/
|
|
134
|
+
private applyDecay;
|
|
135
|
+
/**
|
|
136
|
+
* Consolidate memories (like sleep consolidation)
|
|
137
|
+
* Strengthens frequently accessed, weakly interfered memories
|
|
138
|
+
*/
|
|
139
|
+
consolidate(): {
|
|
140
|
+
consolidated: number;
|
|
141
|
+
forgotten: number;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Get memory statistics
|
|
145
|
+
*/
|
|
146
|
+
getStats(): {
|
|
147
|
+
totalMemories: number;
|
|
148
|
+
avgStrength: number;
|
|
149
|
+
avgConsolidation: number;
|
|
150
|
+
avgInterference: number;
|
|
151
|
+
};
|
|
152
|
+
private cosineSimilarity;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Manages agent state as movement through embedding space.
|
|
156
|
+
* Decisions become geometric - no explicit state machine.
|
|
157
|
+
*/
|
|
158
|
+
export declare class EmbeddingStateMachine {
|
|
159
|
+
private agents;
|
|
160
|
+
private modeRegions;
|
|
161
|
+
private config;
|
|
162
|
+
constructor(config?: NeuralConfig);
|
|
163
|
+
/**
|
|
164
|
+
* Create or update an agent
|
|
165
|
+
*/
|
|
166
|
+
updateAgent(id: string, embedding: number[] | Float32Array): AgentState;
|
|
167
|
+
/**
|
|
168
|
+
* Define a mode region in embedding space
|
|
169
|
+
*/
|
|
170
|
+
defineMode(name: string, centroid: number[] | Float32Array, radius?: number): void;
|
|
171
|
+
/**
|
|
172
|
+
* Determine which mode an agent is in based on position
|
|
173
|
+
*/
|
|
174
|
+
private determineMode;
|
|
175
|
+
/**
|
|
176
|
+
* Get agent trajectory prediction
|
|
177
|
+
*/
|
|
178
|
+
predictTrajectory(id: string, steps?: number): Float32Array[];
|
|
179
|
+
/**
|
|
180
|
+
* Apply attention to agent state
|
|
181
|
+
*/
|
|
182
|
+
attendTo(agentId: string, focusEmbedding: number[] | Float32Array): void;
|
|
183
|
+
/**
|
|
184
|
+
* Get all agents in a specific mode
|
|
185
|
+
*/
|
|
186
|
+
getAgentsInMode(mode: string): AgentState[];
|
|
187
|
+
private euclideanDistance;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Enables multi-agent coordination through shared embedding space.
|
|
191
|
+
* Swarm behavior emerges from geometry, not protocol.
|
|
192
|
+
*/
|
|
193
|
+
export declare class SwarmCoordinator {
|
|
194
|
+
private agents;
|
|
195
|
+
private sharedContext;
|
|
196
|
+
private config;
|
|
197
|
+
constructor(config?: NeuralConfig);
|
|
198
|
+
/**
|
|
199
|
+
* Register an agent with the swarm
|
|
200
|
+
*/
|
|
201
|
+
register(id: string, embedding: number[] | Float32Array, specialty?: string): void;
|
|
202
|
+
/**
|
|
203
|
+
* Update agent position (from their work/observations)
|
|
204
|
+
*/
|
|
205
|
+
update(id: string, embedding: number[] | Float32Array): void;
|
|
206
|
+
/**
|
|
207
|
+
* Update shared context (centroid of all agents)
|
|
208
|
+
*/
|
|
209
|
+
private updateSharedContext;
|
|
210
|
+
/**
|
|
211
|
+
* Get coordination signal for an agent (how to align with swarm)
|
|
212
|
+
*/
|
|
213
|
+
getCoordinationSignal(id: string): Float32Array;
|
|
214
|
+
/**
|
|
215
|
+
* Find agents working on similar things (for collaboration)
|
|
216
|
+
*/
|
|
217
|
+
findCollaborators(id: string, k?: number): Array<{
|
|
218
|
+
id: string;
|
|
219
|
+
similarity: number;
|
|
220
|
+
specialty: string;
|
|
221
|
+
}>;
|
|
222
|
+
/**
|
|
223
|
+
* Detect emergent clusters (specialization)
|
|
224
|
+
*/
|
|
225
|
+
detectClusters(threshold?: number): Map<string, string[]>;
|
|
226
|
+
/**
|
|
227
|
+
* Get swarm coherence (how aligned are agents)
|
|
228
|
+
*/
|
|
229
|
+
getCoherence(): number;
|
|
230
|
+
private cosineSimilarity;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Monitors system coherence via embedding patterns.
|
|
234
|
+
* Detects degradation, poisoning, misalignment before explicit failures.
|
|
235
|
+
*/
|
|
236
|
+
export declare class CoherenceMonitor {
|
|
237
|
+
private history;
|
|
238
|
+
private baselineDistribution;
|
|
239
|
+
private config;
|
|
240
|
+
constructor(config?: NeuralConfig & {
|
|
241
|
+
windowSize?: number;
|
|
242
|
+
});
|
|
243
|
+
/**
|
|
244
|
+
* Record an observation
|
|
245
|
+
*/
|
|
246
|
+
observe(embedding: number[] | Float32Array, source?: string): void;
|
|
247
|
+
/**
|
|
248
|
+
* Establish baseline distribution
|
|
249
|
+
*/
|
|
250
|
+
calibrate(): void;
|
|
251
|
+
/**
|
|
252
|
+
* Generate coherence report
|
|
253
|
+
*/
|
|
254
|
+
report(): CoherenceReport;
|
|
255
|
+
private calculateDriftScore;
|
|
256
|
+
private calculateStabilityScore;
|
|
257
|
+
private calculateAlignmentScore;
|
|
258
|
+
private cosineSimilarity;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Unified neural embedding substrate combining all components.
|
|
262
|
+
* Acts like a synthetic nervous system with reflexes, memory, and coordination.
|
|
263
|
+
*/
|
|
264
|
+
export declare class NeuralSubstrate {
|
|
265
|
+
readonly drift: SemanticDriftDetector;
|
|
266
|
+
readonly memory: MemoryPhysics;
|
|
267
|
+
readonly state: EmbeddingStateMachine;
|
|
268
|
+
readonly swarm: SwarmCoordinator;
|
|
269
|
+
readonly coherence: CoherenceMonitor;
|
|
270
|
+
private config;
|
|
271
|
+
private reflexLatency;
|
|
272
|
+
constructor(config?: NeuralConfig);
|
|
273
|
+
/**
|
|
274
|
+
* Process an embedding through the entire substrate
|
|
275
|
+
*/
|
|
276
|
+
process(embedding: number[] | Float32Array, options?: {
|
|
277
|
+
agentId?: string;
|
|
278
|
+
memoryId?: string;
|
|
279
|
+
content?: string;
|
|
280
|
+
source?: string;
|
|
281
|
+
}): {
|
|
282
|
+
drift: DriftEvent | null;
|
|
283
|
+
memory: NeuralMemoryEntry | null;
|
|
284
|
+
state: AgentState | null;
|
|
285
|
+
};
|
|
286
|
+
/**
|
|
287
|
+
* Query the substrate
|
|
288
|
+
*/
|
|
289
|
+
query(embedding: number[] | Float32Array, k?: number): {
|
|
290
|
+
memories: NeuralMemoryEntry[];
|
|
291
|
+
collaborators: Array<{
|
|
292
|
+
id: string;
|
|
293
|
+
similarity: number;
|
|
294
|
+
specialty: string;
|
|
295
|
+
}>;
|
|
296
|
+
coherence: CoherenceReport;
|
|
297
|
+
};
|
|
298
|
+
/**
|
|
299
|
+
* Get overall system health
|
|
300
|
+
*/
|
|
301
|
+
health(): {
|
|
302
|
+
driftStats: ReturnType<SemanticDriftDetector['getStats']>;
|
|
303
|
+
memoryStats: ReturnType<MemoryPhysics['getStats']>;
|
|
304
|
+
swarmCoherence: number;
|
|
305
|
+
coherenceReport: CoherenceReport;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* Run consolidation (like "sleep")
|
|
309
|
+
*/
|
|
310
|
+
consolidate(): {
|
|
311
|
+
consolidated: number;
|
|
312
|
+
forgotten: number;
|
|
313
|
+
};
|
|
314
|
+
/**
|
|
315
|
+
* Calibrate coherence baseline
|
|
316
|
+
*/
|
|
317
|
+
calibrate(): void;
|
|
318
|
+
}
|
|
319
|
+
export default NeuralSubstrate;
|
|
320
|
+
//# sourceMappingURL=neural-embeddings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"neural-embeddings.d.ts","sourceRoot":"","sources":["../../src/core/neural-embeddings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,YAAY,CAAC;IACxB,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EA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