Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ members = [
"crates/ruvector-dither",
"crates/ruvector-robotics",
"examples/robotics",
"crates/neural-trader-core",
"crates/neural-trader-coherence",
"crates/neural-trader-replay",
"crates/neural-trader-wasm",
]
resolver = "2"

Expand Down
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ npx @ruvector/rvf-mcp-server --transport stdio # MCP server for AI agents

**Rust crates** (23): [`rvf-types`](https://crates.io/crates/rvf-types) `rvf-wire` `rvf-manifest` `rvf-quant` `rvf-index` `rvf-crypto` [`rvf-runtime`](https://crates.io/crates/rvf-runtime) `rvf-kernel` `rvf-ebpf` [`rvf-federation`](./crates/rvf/rvf-federation) `rvf-launch` `rvf-server` `rvf-import` [`rvf-cli`](https://crates.io/crates/rvf-cli) `rvf-wasm` `rvf-solver-wasm` `rvf-node` + 6 adapters (claude-flow, agentdb, ospipe, agentic-flow, rvlite, sona)

**npm packages** (5): [`@ruvector/rvf`](https://www.npmjs.com/package/@ruvector/rvf) [`@ruvector/rvf-node`](https://www.npmjs.com/package/@ruvector/rvf-node) [`@ruvector/rvf-wasm`](https://www.npmjs.com/package/@ruvector/rvf-wasm) [`@ruvector/rvf-mcp-server`](https://www.npmjs.com/package/@ruvector/rvf-mcp-server) [`@ruvector/ruvllm-wasm`](https://www.npmjs.com/package/@ruvector/ruvllm-wasm)
**npm packages** (6): [`@ruvector/rvf`](https://www.npmjs.com/package/@ruvector/rvf) [`@ruvector/rvf-node`](https://www.npmjs.com/package/@ruvector/rvf-node) [`@ruvector/rvf-wasm`](https://www.npmjs.com/package/@ruvector/rvf-wasm) [`@ruvector/rvf-mcp-server`](https://www.npmjs.com/package/@ruvector/rvf-mcp-server) [`@ruvector/ruvllm-wasm`](https://www.npmjs.com/package/@ruvector/ruvllm-wasm) [`@ruvector/neural-trader-wasm`](https://www.npmjs.com/package/@ruvector/neural-trader-wasm)

- **Security Hardened RVF** ([`examples/security_hardened.rvf`](./examples/security_hardened.rvf)) — 2.1 MB sealed artifact with 22 verified capabilities: TEE attestation (SGX/SEV-SNP/TDX/ARM CCA), AIDefence (injection/jailbreak/PII/exfil), hardened Linux microkernel, eBPF firewall, Ed25519 signing, 6-role RBAC, Coherence Gate, 30-entry witness chain, Paranoid policy, COW branching, audited k-NN. See [ADR-042](./docs/adr/ADR-042-Security-RVF-AIDefence-TEE.md).
- **Full documentation**: [crates/rvf/README.md](./crates/rvf/README.md)
Expand Down Expand Up @@ -1440,7 +1440,7 @@ RuVector runs on Node.js, Rust, browsers, PostgreSQL, and Docker. Pick the packa
</details>

<details>
<summary>🦀 Rust Crates (83 Packages)</summary>
<summary>🦀 Rust Crates (87 Packages)</summary>

All crates are published to [crates.io](https://crates.io) under the `ruvector-*` and `rvf-*` namespaces.

Expand Down Expand Up @@ -1535,6 +1535,17 @@ wget https://huggingface.co/ruv/ruvltra/resolve/main/ruvltra-small-0.5b-q4_k_m.g

**Hybrid Routing** achieves **90% accuracy** for agent routing using keyword-first strategy with embedding fallback. See [Issue #122](https://github.com/ruvnet/ruvector/issues/122) for benchmarks and the [training tutorials](#-ruvllm-training--fine-tuning-tutorials) for fine-tuning guides.

### Neural Trader

| Crate | Description | crates.io |
|-------|-------------|-----------|
| [neural-trader-core](./crates/neural-trader-core) | Market event types, ingest pipeline, graph schema | `publish = false` |
| [neural-trader-coherence](./crates/neural-trader-coherence) | MinCut coherence gate with CUSUM drift detection | `publish = false` |
| [neural-trader-replay](./crates/neural-trader-replay) | Reservoir replay store with proof-gated writes | `publish = false` |
| [neural-trader-wasm](./crates/neural-trader-wasm) | WASM bindings for browser coherence gates & replay | `publish = false` |

Six-layer pipeline treating the limit order book as a dynamic heterogeneous typed graph. See [ADR-085](./docs/adr/ADR-085-neural-trader-ruvector.md) for architecture, [ADR-086](./docs/adr/ADR-086-neural-trader-wasm.md) for WASM bindings.

### Dynamic Min-Cut (December 2025 Breakthrough)

| Crate | Description | crates.io |
Expand Down
151 changes: 150 additions & 1 deletion crates/mcp-brain-server/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1286,6 +1286,68 @@ <h3>Access the brain</h3>
}
scene.add(ringGroup);

// ── Animated squares (billboard sprites that always face camera) ──
function createSquareTexture(size, color) {
const c = document.createElement('canvas');
c.width = size; c.height = size;
const ctx = c.getContext('2d');
ctx.clearRect(0, 0, size, size);
const pad = size * 0.15;
ctx.strokeStyle = color;
ctx.lineWidth = size * 0.04;
ctx.globalAlpha = 0.9;
ctx.strokeRect(pad, pad, size - pad * 2, size - pad * 2);
ctx.globalAlpha = 0.15;
ctx.fillStyle = color;
ctx.fillRect(pad, pad, size - pad * 2, size - pad * 2);
const tex = new THREE.CanvasTexture(c);
tex.needsUpdate = true;
return tex;
}

const sqTexWarm = createSquareTexture(64, '#e8a634');
const sqTexBlue = createSquareTexture(64, '#5b8def');

const SQUARE_COUNT = isMobile ? 20 : 45;
const squareGroup = new THREE.Group();
const squareData = [];

for (let i = 0; i < SQUARE_COUNT; i++) {
const isBlue = Math.random() > 0.75;
const baseOp = 0.12 + Math.random() * 0.18;
const mat = new THREE.SpriteMaterial({
map: isBlue ? sqTexBlue : sqTexWarm,
transparent: true,
opacity: baseOp,
blending: THREE.AdditiveBlending,
depthWrite: false,
rotation: Math.random() * Math.PI,
});
const sprite = new THREE.Sprite(mat);
const scale = 0.6 + Math.random() * 2.0;
sprite.scale.set(scale, scale, 1);

const theta = Math.random() * Math.PI * 2;
const phi = Math.acos(2 * Math.random() - 1);
const r = 6 + Math.random() * 18;
sprite.position.set(
r * Math.sin(phi) * Math.cos(theta),
r * Math.sin(phi) * Math.sin(theta) * 0.6,
r * Math.cos(phi)
);

squareGroup.add(sprite);
squareData.push({
sprite,
baseY: sprite.position.y,
rotSpeed: (Math.random() - 0.5) * 0.3,
floatSpeed: 0.15 + Math.random() * 0.5,
phase: Math.random() * Math.PI * 2,
baseOpacity: baseOp,
});
}
scene.add(squareGroup);

// ── Data particles (memories as tiny points of light) ──
let particleGroup = null;
let particleVelocities = [];
Expand Down Expand Up @@ -1330,6 +1392,51 @@ <h3>Access the brain</h3>
}
buildParticles(null);

// ── Dot-matrix grid (mouse-reactive anti-gravity wave field) ──
const GRID = isMobile ? 28 : 48;
const GRID_SPACING = isMobile ? 1.8 : 1.4;
const GRID_HALF = (GRID - 1) * GRID_SPACING * 0.5;
const dotCount = GRID * GRID;
const dotPos = new Float32Array(dotCount * 3);
const dotCol = new Float32Array(dotCount * 3);
const dotBase = []; // store rest positions

for (let ix = 0; ix < GRID; ix++) {
for (let iz = 0; iz < GRID; iz++) {
const idx = ix * GRID + iz;
const x = ix * GRID_SPACING - GRID_HALF;
const z = iz * GRID_SPACING - GRID_HALF;
dotPos[idx * 3] = x;
dotPos[idx * 3 + 1] = -14; // flat plane below center
dotPos[idx * 3 + 2] = z;
dotBase.push({ x, z });
// Faint warm tint, cooler toward edges
const edgeDist = Math.sqrt(x * x + z * z) / GRID_HALF;
const c = warm.clone().lerp(blue, edgeDist * 0.6).multiplyScalar(0.5 + (1 - edgeDist) * 0.5);
dotCol[idx * 3] = c.r;
dotCol[idx * 3 + 1] = c.g;
dotCol[idx * 3 + 2] = c.b;
}
}

const dotGeo = new THREE.BufferGeometry();
dotGeo.setAttribute('position', new THREE.BufferAttribute(dotPos, 3));
dotGeo.setAttribute('color', new THREE.BufferAttribute(dotCol, 3));
const dotMat = new THREE.PointsMaterial({
size: isMobile ? 0.35 : 0.25,
vertexColors: true,
transparent: true,
opacity: 0.18,
blending: THREE.AdditiveBlending,
sizeAttenuation: true,
depthWrite: false,
});
const dotMatrix = new THREE.Points(dotGeo, dotMat);
scene.add(dotMatrix);

// Mouse position projected onto the grid plane (world coords)
let mouseWorldX = 0, mouseWorldZ = 0;

// ── Central core (tiny glowing sphere) ──
const coreGeo = new THREE.SphereGeometry(0.4, 32, 32);
const coreMat = new THREE.MeshBasicMaterial({ color: warm, transparent: true, opacity: 0.6 });
Expand Down Expand Up @@ -1367,6 +1474,47 @@ <h3>Access the brain</h3>
coreMat.opacity = pulse + 0.2;
halo.scale.setScalar(1 + Math.sin(time * 2) * 0.2);

// Squares drift + rotate
for (const s of squareData) {
s.sprite.material.rotation += s.rotSpeed * 0.004;
s.sprite.position.y = s.baseY + Math.sin(time * s.floatSpeed + s.phase) * 1.2;
s.sprite.material.opacity = s.baseOpacity * (0.7 + Math.sin(time * 1.2 + s.phase) * 0.3);
}
squareGroup.rotation.y = time * 0.06;

// Dot-matrix wave field
mouseWorldX += (mouseX * GRID_HALF * 0.8 - mouseWorldX) * 0.08;
mouseWorldZ += (mouseY * GRID_HALF * 0.6 - mouseWorldZ) * 0.08;
const dp = dotMatrix.geometry.attributes.position.array;
for (let i = 0; i < dotCount; i++) {
const bx = dotBase[i].x;
const bz = dotBase[i].z;
const dx = bx - mouseWorldX;
const dz = bz - mouseWorldZ;
const dist = Math.sqrt(dx * dx + dz * dz);
// Anti-gravity repulsion dome around cursor
const repulse = Math.max(0, 1 - dist / (GRID_HALF * 0.45));
const lift = repulse * repulse * 12;
// Hyperdimensional ripple waves — deep multi-frequency
const wave1 = Math.sin(dist * 0.4 - time * 6) * 1.0 * repulse;
const wave2 = Math.sin(bx * 0.3 + bz * 0.3 + time * 2) * 0.4;
const wave3 = Math.cos(dist * 0.2 + time * 3) * 0.5 * (1 - repulse * 0.5);
// Breathing ambient undulation across entire grid
const breath = Math.sin(bx * 0.12 + time * 1.5) * Math.cos(bz * 0.12 + time * 1.2) * 0.8;
// Concentric pulse rings expanding from center
const centerDist = Math.sqrt(bx * bx + bz * bz);
const pulse2 = Math.sin(centerDist * 0.25 - time * 4) * 0.5;
// High-frequency dimensional shimmer
const shimmer = Math.sin(bx * 0.8 - bz * 0.6 + time * 8) * 0.12 * repulse;
dp[i * 3 + 1] = -14 + lift + wave1 + wave2 + wave3 + breath + pulse2 + shimmer;
// Deeper xy displacement — swirling vortex near cursor
const angle = Math.atan2(dz, dx);
const spiral = repulse * repulse * 1.2;
dp[i * 3] = bx + Math.sin(angle + time * 3) * spiral + Math.sin(dist * 0.3 - time * 4) * repulse * 0.6;
dp[i * 3 + 2] = bz + Math.cos(angle + time * 3) * spiral + Math.cos(dist * 0.3 - time * 4) * repulse * 0.6;
}
dotMatrix.geometry.attributes.position.needsUpdate = true;

// Particles drift
if (particleGroup) {
const pp = particleGroup.geometry.attributes.position.array;
Expand Down Expand Up @@ -1411,7 +1559,8 @@ <h3>Access the brain</h3>

const status = statusResp.ok ? await statusResp.json() : null;
const health = healthResp.ok ? await healthResp.json() : null;
const memories = memResp.ok ? await memResp.json() : [];
const memJson = memResp.ok ? await memResp.json() : [];
const memories = Array.isArray(memJson) ? memJson : (Array.isArray(memJson.memories) ? memJson.memories : []);

if (status) {
console.log('[π] Status data:', JSON.stringify(status));
Expand Down
Loading