Commit graph

387 commits

Author SHA1 Message Date
rUv
4f4e80381d feat(edge): add ruv-swarm-transport integration example
New example: examples/edge/
- Distributed AI swarm communication using ruv-swarm-transport
- WebSocket, SharedMemory, and WASM transport support
- Intelligence sync for distributed Q-learning patterns
- Shared vector memory for collaborative RAG
- LZ4 + quantization tensor compression (up to 12x)
- Protocol with Join, Sync, Task, Election messages
- Agent roles: Coordinator, Worker, Scout, Specialist

Binaries:
- edge-demo: Demo of distributed learning
- edge-agent: CLI agent that joins swarm
- edge-coordinator: Swarm coordinator

Dependencies:
- ruv-swarm-transport v1.0.5
- tokio, serde, lz4_flex, clap
2025-12-31 17:20:51 +00:00
Claude
65e792f24c perf(neural-trader): optimize backtesting and risk management
Backtesting:
- Single-pass metrics calculation (was 10+ passes)
- Inline stats: mean, variance, win/loss counts computed together
- Combined drawdown metrics in one pass
- Removed redundant method calls

Risk Management:
- Ring buffers for trade history (O(1) vs O(n) shift/slice)
- Running sum for volatility average (O(1) vs O(n) reduce)
- Incremental loss count tracking

Reduces iteration overhead by ~5-10x for large datasets.
2025-12-31 17:19:03 +00:00
Claude
3fcdbe48c1 perf(neural-trader): optimize backtesting and risk management
Backtesting:
- Single-pass metrics calculation (was 10+ passes)
- Inline stats: mean, variance, win/loss counts computed together
- Combined drawdown metrics in one pass
- Removed redundant method calls

Risk Management:
- Ring buffers for trade history (O(1) vs O(n) shift/slice)
- Running sum for volatility average (O(1) vs O(n) reduce)
- Incremental loss count tracking

Reduces iteration overhead by ~5-10x for large datasets.
2025-12-31 17:19:03 +00:00
Claude
69d63cc4b8 feat(neural-trader): add integrated trading system
Components:
- DAG-based trading pipeline (4.6ms latency)
  • Parallel execution of LSTM, Sentiment, DRL
  • Signal fusion with configurable weights
  • Kelly-based position sizing

- Backtesting framework
  • Sharpe, Sortino, Calmar ratios
  • Max drawdown, VaR, CVaR
  • Walk-forward analysis
  • Comprehensive trade statistics

- Real data connectors
  • Yahoo Finance (free, historical)
  • Alpha Vantage (sentiment, intraday)
  • Binance (crypto, WebSocket)
  • Rate limiting, caching, retry logic

- Risk management layer
  • Position limits (10% max per position)
  • Stop-losses (fixed, trailing, volatility)
  • Circuit breakers (drawdown, loss rate)
  • Exposure management (leverage control)
2025-12-31 17:02:40 +00:00
Claude
bca9855278 feat(neural-trader): add integrated trading system
Components:
- DAG-based trading pipeline (4.6ms latency)
  • Parallel execution of LSTM, Sentiment, DRL
  • Signal fusion with configurable weights
  • Kelly-based position sizing

- Backtesting framework
  • Sharpe, Sortino, Calmar ratios
  • Max drawdown, VaR, CVaR
  • Walk-forward analysis
  • Comprehensive trade statistics

- Real data connectors
  • Yahoo Finance (free, historical)
  • Alpha Vantage (sentiment, intraday)
  • Binance (crypto, WebSocket)
  • Rate limiting, caching, retry logic

- Risk management layer
  • Position limits (10% max per position)
  • Stop-losses (fixed, trailing, volatility)
  • Circuit breakers (drawdown, loss rate)
  • Exposure management (leverage control)
2025-12-31 17:02:40 +00:00
Claude
8873f28075 perf(neural-trader): optimize LSTM, attention, and sentiment
- LSTM: pre-allocate gate vectors, inline sigmoid/tanh (avoid map/reduce)
- MultiHeadAttention: cache-friendly i-k-j matmul, optimized softmax
- FeedForward: pre-allocate hidden layer, manual loops
- LayerNorm: manual mean/variance computation
- Lexicon: char-based word extraction (avoid regex)

Key improvements:
- Buffer push: 1.1M/s (+67%)
- Buffer sample: 319K/s (+22%)
- Lexicon: 346K/s (+16%)
2025-12-31 14:19:27 +00:00
Claude
30f5f25ada perf(neural-trader): optimize LSTM, attention, and sentiment
- LSTM: pre-allocate gate vectors, inline sigmoid/tanh (avoid map/reduce)
- MultiHeadAttention: cache-friendly i-k-j matmul, optimized softmax
- FeedForward: pre-allocate hidden layer, manual loops
- LayerNorm: manual mean/variance computation
- Lexicon: char-based word extraction (avoid regex)

Key improvements:
- Buffer push: 1.1M/s (+67%)
- Buffer sample: 319K/s (+22%)
- Lexicon: 346K/s (+16%)
2025-12-31 14:19:27 +00:00
Claude
88f6fdd0b2 feat(neural-trader): add production modules with benchmarks
- Add Fractional Kelly engine (1/5th Kelly, 576K ops/s)
- Add Hybrid LSTM-Transformer predictor (1.8K predictions/s)
- Add DRL Portfolio Manager (PPO/SAC/A2C ensemble, 17K ops/s)
- Add Sentiment Alpha pipeline (3.7K signals/s)
- Add comprehensive benchmark suite and documentation

All modules production-ready with sub-millisecond latency.
2025-12-31 14:12:41 +00:00
Claude
920ae74312 feat(neural-trader): add production modules with benchmarks
- Add Fractional Kelly engine (1/5th Kelly, 576K ops/s)
- Add Hybrid LSTM-Transformer predictor (1.8K predictions/s)
- Add DRL Portfolio Manager (PPO/SAC/A2C ensemble, 17K ops/s)
- Add Sentiment Alpha pipeline (3.7K signals/s)
- Add comprehensive benchmark suite and documentation

All modules production-ready with sub-millisecond latency.
2025-12-31 14:12:41 +00:00
Claude
4865218ca9 perf(neural-trader): benchmark suite and additional optimizations
Added benchmark.js performance suite measuring:
- GNN correlation matrix construction
- Matrix multiplication (original vs optimized)
- Object pooling vs direct allocation
- Ring buffer vs Array.shift()
- Softmax function performance

Additional optimizations:
- attention-regime-detection.js: Optimized softmax avoids spread operator,
  uses loop-based max finding and single-pass exp+sum (2x speedup)
- gnn-correlation-network.js: Pre-computed statistics for Pearson correlation
  via precomputeStats() and calculateCorrelationFast() methods. Avoids
  recomputing mean/std for each pair. Spearman rank also optimized.

Benchmark results:
- Cache-friendly matmul: 1.7-2.9x speedup
- Object pooling: 2.7x speedup
- Ring buffer: 12-14x speedup
- Optimized softmax: 2x speedup
2025-12-31 06:15:53 +00:00
Claude
beb6403bed perf(neural-trader): benchmark suite and additional optimizations
Added benchmark.js performance suite measuring:
- GNN correlation matrix construction
- Matrix multiplication (original vs optimized)
- Object pooling vs direct allocation
- Ring buffer vs Array.shift()
- Softmax function performance

Additional optimizations:
- attention-regime-detection.js: Optimized softmax avoids spread operator,
  uses loop-based max finding and single-pass exp+sum (2x speedup)
- gnn-correlation-network.js: Pre-computed statistics for Pearson correlation
  via precomputeStats() and calculateCorrelationFast() methods. Avoids
  recomputing mean/std for each pair. Spearman rank also optimized.

Benchmark results:
- Cache-friendly matmul: 1.7-2.9x speedup
- Object pooling: 2.7x speedup
- Ring buffer: 12-14x speedup
- Optimized softmax: 2x speedup
2025-12-31 06:15:53 +00:00
rUv
085bb0a453 docs(onnx-wasm): comprehensive README update for v0.1.2
- Added SIMD badge and documentation
- Added ParallelEmbedder API reference and usage examples
- Updated performance benchmarks with parallel vs sequential comparison
- Added browser compatibility table
- Added changelog section
- Added batch processing use case example
- Updated build instructions with SIMD flags

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 05:10:36 +00:00
rUv
d431fabca8 docs(onnx-wasm): comprehensive README update for v0.1.2
- Added SIMD badge and documentation
- Added ParallelEmbedder API reference and usage examples
- Updated performance benchmarks with parallel vs sequential comparison
- Added browser compatibility table
- Added changelog section
- Added batch processing use case example
- Updated build instructions with SIMD flags

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 05:10:36 +00:00
rUv
5837e5e99d feat(onnx-wasm): add parallel worker threads for 3.8x batch speedup
- ParallelEmbedder class using Node.js worker_threads
- Distributes batches across multiple CPU cores
- Benchmark results: 3.6-3.8x speedup on batch processing
- Per-text latency drops from ~390ms to ~103ms with 4 workers
- Published v0.1.2 to npm and crates.io

Usage:
  import { ParallelEmbedder } from 'ruvector-onnx-embeddings-wasm/parallel';
  const embedder = new ParallelEmbedder({ numWorkers: 4 });
  await embedder.init();
  const embeddings = await embedder.embedBatch(texts);

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 05:02:28 +00:00
rUv
b5063b4bdc feat(onnx-wasm): add parallel worker threads for 3.8x batch speedup
- ParallelEmbedder class using Node.js worker_threads
- Distributes batches across multiple CPU cores
- Benchmark results: 3.6-3.8x speedup on batch processing
- Per-text latency drops from ~390ms to ~103ms with 4 workers
- Published v0.1.2 to npm and crates.io

Usage:
  import { ParallelEmbedder } from 'ruvector-onnx-embeddings-wasm/parallel';
  const embedder = new ParallelEmbedder({ numWorkers: 4 });
  await embedder.init();
  const embeddings = await embedder.embedBatch(texts);

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 05:02:28 +00:00
rUv
7c54eafbba feat(onnx-wasm): add SIMD support for improved performance
- Enable WASM SIMD128 instructions for vectorized operations
- Update simd_available() to properly detect SIMD at compile time
- SIMD build is 180KB smaller than non-SIMD (more compact instructions)
- Published v0.1.1 to both npm and crates.io

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:41:53 +00:00
rUv
e45c802282 feat(onnx-wasm): add SIMD support for improved performance
- Enable WASM SIMD128 instructions for vectorized operations
- Update simd_available() to properly detect SIMD at compile time
- SIMD build is 180KB smaller than non-SIMD (more compact instructions)
- Published v0.1.1 to both npm and crates.io

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:41:53 +00:00
rUv
938a82f1b4 docs(onnx-wasm): add comprehensive README with badges and API reference
- Added npm and crates.io version badges
- WebAssembly and MIT license badges
- Quick start examples for Browser, Node.js, and Cloudflare Workers
- Complete API reference for WasmEmbedder, WasmEmbedderConfig
- Model comparison table with 6 HuggingFace models
- Performance benchmarks and use case examples

Published to npm as ruvector-onnx-embeddings-wasm@0.1.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:19:26 +00:00
rUv
3bd4ff279d docs(onnx-wasm): add comprehensive README with badges and API reference
- Added npm and crates.io version badges
- WebAssembly and MIT license badges
- Quick start examples for Browser, Node.js, and Cloudflare Workers
- Complete API reference for WasmEmbedder, WasmEmbedderConfig
- Model comparison table with 6 HuggingFace models
- Performance benchmarks and use case examples

Published to npm as ruvector-onnx-embeddings-wasm@0.1.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:19:26 +00:00
rUv
1ac3905c1a feat(onnx-embeddings-wasm): add model loader with HuggingFace support
Adds loader.js with:
- Pre-configured model URLs for 6 popular models
- ModelLoader class with caching and progress reporting
- createEmbedder() helper for quick setup
- embed() and similarity() one-liner helpers

Supported models:
- all-MiniLM-L6-v2 (default)
- all-MiniLM-L12-v2
- bge-small-en-v1.5
- bge-base-en-v1.5
- e5-small-v2
- gte-small

Usage:
```javascript
import { createEmbedder } from './loader.js';
const embedder = await createEmbedder('all-MiniLM-L6-v2');
const embedding = embedder.embedOne("Hello world");
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:12:48 +00:00
rUv
61880d627f feat(onnx-embeddings-wasm): add model loader with HuggingFace support
Adds loader.js with:
- Pre-configured model URLs for 6 popular models
- ModelLoader class with caching and progress reporting
- createEmbedder() helper for quick setup
- embed() and similarity() one-liner helpers

Supported models:
- all-MiniLM-L6-v2 (default)
- all-MiniLM-L12-v2
- bge-small-en-v1.5
- bge-base-en-v1.5
- e5-small-v2
- gte-small

Usage:
```javascript
import { createEmbedder } from './loader.js';
const embedder = await createEmbedder('all-MiniLM-L6-v2');
const embedding = embedder.embedOne("Hello world");
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:12:48 +00:00
rUv
454ec86a68 test(onnx-embeddings-wasm): add WASM validation test
Validates core WASM bindings work:
- Version check
- Cosine similarity utility
- L2 normalization utility
- Config creation and chaining

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:07:57 +00:00
rUv
69617b3536 test(onnx-embeddings-wasm): add WASM validation test
Validates core WASM bindings work:
- Version check
- Cosine similarity utility
- L2 normalization utility
- Config creation and chaining

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:07:57 +00:00
Claude
e8bd6d7d97 perf(neural-trader): add performance optimizations across exotic examples
- gnn-correlation-network.js: Added RollingStats class for O(1) incremental
  updates and correlation caching with TTL to avoid redundant O(n²) calculations

- attention-regime-detection.js: Optimized matmul with cache-friendly i-k-j
  loop order and added empty matrix guards

- quantum-portfolio-optimization.js: Added ComplexPool for object reuse to
  reduce GC pressure, plus in-place operations (addInPlace, multiplyInPlace,
  scaleInPlace) to avoid allocations in hot loops

- multi-agent-swarm.js: Added RingBuffer for O(1) bounded memory operations
  and SignalPool for signal object reuse
2025-12-31 04:07:13 +00:00
Claude
261699621a perf(neural-trader): add performance optimizations across exotic examples
- gnn-correlation-network.js: Added RollingStats class for O(1) incremental
  updates and correlation caching with TTL to avoid redundant O(n²) calculations

- attention-regime-detection.js: Optimized matmul with cache-friendly i-k-j
  loop order and added empty matrix guards

- quantum-portfolio-optimization.js: Added ComplexPool for object reuse to
  reduce GC pressure, plus in-place operations (addInPlace, multiplyInPlace,
  scaleInPlace) to avoid allocations in hot loops

- multi-agent-swarm.js: Added RingBuffer for O(1) bounded memory operations
  and SignalPool for signal object reuse
2025-12-31 04:07:13 +00:00
rUv
515c9b9e13 feat(onnx-embeddings-wasm): add WASM-compatible embedding crate
New optional companion package using Tract for inference:
- Runs in browsers, Cloudflare Workers, Deno, edge environments
- Same API as native crate
- JavaScript bindings via wasm-bindgen
- Supports all pooling strategies (Mean, Cls, Max, etc.)

Uses Tract instead of ONNX Runtime for WASM compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:00:24 +00:00
rUv
1ecbc2e970 feat(onnx-embeddings-wasm): add WASM-compatible embedding crate
New optional companion package using Tract for inference:
- Runs in browsers, Cloudflare Workers, Deno, edge environments
- Same API as native crate
- JavaScript bindings via wasm-bindgen
- Supports all pooling strategies (Mean, Cls, Max, etc.)

Uses Tract instead of ONNX Runtime for WASM compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 04:00:24 +00:00
rUv
e0c51bf009 chore(onnx-embeddings): fix crates.io category slug
Changed invalid category "machine-learning" to "algorithms".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:37:06 +00:00
rUv
730580c027 chore(onnx-embeddings): fix crates.io category slug
Changed invalid category "machine-learning" to "algorithms".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:37:06 +00:00
rUv
77666d73cb fix(onnx-embeddings): fix HuggingFace model download fallback logic
The download logic would immediately fail if model.onnx wasn't at the
repo root, never trying the onnx/ subfolder where most sentence-transformer
models store their ONNX files.

Now tries both locations:
1. Root: {repo}/model.onnx
2. Subfolder: {repo}/onnx/model.onnx

Also applies fallback logic to auxiliary files (tokenizer.json, config.json).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:34:24 +00:00
rUv
428bab14a3 fix(onnx-embeddings): fix HuggingFace model download fallback logic
The download logic would immediately fail if model.onnx wasn't at the
repo root, never trying the onnx/ subfolder where most sentence-transformer
models store their ONNX files.

Now tries both locations:
1. Root: {repo}/model.onnx
2. Subfolder: {repo}/onnx/model.onnx

Also applies fallback logic to auxiliary files (tokenizer.json, config.json).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-31 03:34:24 +00:00
Claude
4f11807db5 fix(neural-trader): critical algorithm corrections and safety guards
Key fixes across exotic neural-trader examples:

- reinforcement-learning-agent.js: Fixed broken backpropagation that only
  updated output layer. Now stores activations and flows gradients through
  all hidden layers properly.

- quantum-portfolio-optimization.js: Fixed QAOA mixer Hamiltonian that was
  incorrectly accumulating all qubit operations. Now applies Rx rotations
  sequentially per-qubit with proper normalization.

- hyperbolic-embeddings.js: Fixed Math.acosh/atanh domain errors and
  implemented proper Riemannian gradient descent using expMap in Poincaré
  ball model.

- multi-agent-swarm.js: Added division-by-zero guards for linear regression,
  z-score calculation, and iterator type fixes. Added memory bounds.

- gnn-correlation-network.js: Added guards for betweenness normalization
  (n<3), density (n<2), and clustering/degree calculations (n=0).

- attention-regime-detection.js: Added empty array handling for softmax and
  matrix validation for transpose operations.

- atomic-arbitrage.js: Added guard for flash loan spread calculation.
2025-12-31 02:55:21 +00:00
Claude
2c690491ae fix(neural-trader): critical algorithm corrections and safety guards
Key fixes across exotic neural-trader examples:

- reinforcement-learning-agent.js: Fixed broken backpropagation that only
  updated output layer. Now stores activations and flows gradients through
  all hidden layers properly.

- quantum-portfolio-optimization.js: Fixed QAOA mixer Hamiltonian that was
  incorrectly accumulating all qubit operations. Now applies Rx rotations
  sequentially per-qubit with proper normalization.

- hyperbolic-embeddings.js: Fixed Math.acosh/atanh domain errors and
  implemented proper Riemannian gradient descent using expMap in Poincaré
  ball model.

- multi-agent-swarm.js: Added division-by-zero guards for linear regression,
  z-score calculation, and iterator type fixes. Added memory bounds.

- gnn-correlation-network.js: Added guards for betweenness normalization
  (n<3), density (n<2), and clustering/degree calculations (n=0).

- attention-regime-detection.js: Added empty array handling for softmax and
  matrix validation for transpose operations.

- atomic-arbitrage.js: Added guard for flash loan spread calculation.
2025-12-31 02:55:21 +00:00
Claude
9db606e502 feat(examples): add advanced and exotic neural-trader examples
Advanced examples (production-grade):
- live-broker-alpaca.js: Production broker integration with smart order routing
- order-book-microstructure.js: VPIN, Kyle's Lambda, spread decomposition
- conformal-prediction.js: Distribution-free guaranteed prediction intervals

Exotic examples (cutting-edge techniques):
- multi-agent-swarm.js: Distributed trading with consensus mechanisms
- gnn-correlation-network.js: Graph neural network correlation analysis
- attention-regime-detection.js: Transformer attention for regime detection
- reinforcement-learning-agent.js: Deep Q-Learning trading agent
- quantum-portfolio-optimization.js: QAOA and quantum annealing
- hyperbolic-embeddings.js: Poincaré disk market embeddings
- atomic-arbitrage.js: Cross-exchange atomic arbitrage with MEV protection

Updated package.json with npm scripts for all new examples.
Updated README.md with documentation for advanced/exotic techniques.
2025-12-31 02:39:28 +00:00
Claude
fbd9d692f2 feat(examples): add advanced and exotic neural-trader examples
Advanced examples (production-grade):
- live-broker-alpaca.js: Production broker integration with smart order routing
- order-book-microstructure.js: VPIN, Kyle's Lambda, spread decomposition
- conformal-prediction.js: Distribution-free guaranteed prediction intervals

Exotic examples (cutting-edge techniques):
- multi-agent-swarm.js: Distributed trading with consensus mechanisms
- gnn-correlation-network.js: Graph neural network correlation analysis
- attention-regime-detection.js: Transformer attention for regime detection
- reinforcement-learning-agent.js: Deep Q-Learning trading agent
- quantum-portfolio-optimization.js: QAOA and quantum annealing
- hyperbolic-embeddings.js: Poincaré disk market embeddings
- atomic-arbitrage.js: Cross-exchange atomic arbitrage with MEV protection

Updated package.json with npm scripts for all new examples.
Updated README.md with documentation for advanced/exotic techniques.
2025-12-31 02:39:28 +00:00
Claude
9334d2e162 feat(examples): add comprehensive neural-trader integration examples
Add complete integration examples for all 20+ @neural-trader npm packages
with the RuVector platform:

Core Integration:
- basic-integration.js: HNSW vector indexing with trading operations
- hnsw-vector-search.js: Pattern matching with 150x faster native search
- technical-indicators.js: 150+ indicators (RSI, MACD, Bollinger, etc.)

Strategy & Portfolio:
- backtesting.js: Walk-forward optimization, Monte Carlo simulation
- optimization.js: Markowitz, Risk Parity, Black-Litterman portfolios

Neural Networks:
- training.js: LSTM training for price prediction with RuVector storage

Risk Management:
- risk-metrics.js: VaR, CVaR, stress testing, position limits

MCP Integration:
- mcp-server.js: 87+ trading tools via Model Context Protocol

Accounting:
- crypto-tax.js: FIFO/LIFO/HIFO cost basis with native Rust bindings

Specialized Markets:
- sports-betting.js: Arbitrage detection, Kelly criterion sizing
- prediction-markets.js: Polymarket/Kalshi expected value analysis
- news-trading.js: Sentiment-driven event trading

Full Platform:
- platform.js: Complete trading system integration demo

Packages integrated:
- neural-trader@2.7.1 (core engine, 178 NAPI functions)
- @neural-trader/core, strategies, execution, portfolio, risk
- @neural-trader/neural, features, backtesting, market-data
- @neural-trader/mcp, brokers, predictor, backend
- @neural-trader/agentic-accounting-rust-core
- @neural-trader/sports-betting, prediction-markets, news-trading
- @ruvector/core for HNSW vector database
2025-12-31 02:15:02 +00:00
Claude
84538b082a feat(examples): add comprehensive neural-trader integration examples
Add complete integration examples for all 20+ @neural-trader npm packages
with the RuVector platform:

Core Integration:
- basic-integration.js: HNSW vector indexing with trading operations
- hnsw-vector-search.js: Pattern matching with 150x faster native search
- technical-indicators.js: 150+ indicators (RSI, MACD, Bollinger, etc.)

Strategy & Portfolio:
- backtesting.js: Walk-forward optimization, Monte Carlo simulation
- optimization.js: Markowitz, Risk Parity, Black-Litterman portfolios

Neural Networks:
- training.js: LSTM training for price prediction with RuVector storage

Risk Management:
- risk-metrics.js: VaR, CVaR, stress testing, position limits

MCP Integration:
- mcp-server.js: 87+ trading tools via Model Context Protocol

Accounting:
- crypto-tax.js: FIFO/LIFO/HIFO cost basis with native Rust bindings

Specialized Markets:
- sports-betting.js: Arbitrage detection, Kelly criterion sizing
- prediction-markets.js: Polymarket/Kalshi expected value analysis
- news-trading.js: Sentiment-driven event trading

Full Platform:
- platform.js: Complete trading system integration demo

Packages integrated:
- neural-trader@2.7.1 (core engine, 178 NAPI functions)
- @neural-trader/core, strategies, execution, portfolio, risk
- @neural-trader/neural, features, backtesting, market-data
- @neural-trader/mcp, brokers, predictor, backend
- @neural-trader/agentic-accounting-rust-core
- @neural-trader/sports-betting, prediction-markets, news-trading
- @ruvector/core for HNSW vector database
2025-12-31 02:15:02 +00:00
rUv
8286df7814 fix(postgres): remove Rust examples that cause linker errors
The Rust example files (learning_demo.rs, simd_distance_benchmark.rs)
were causing linker errors during pgrx tests because they use pgrx
functions without proper PostgreSQL library context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:41:16 +00:00
rUv
9327b2bd6f fix(postgres): remove Rust examples that cause linker errors
The Rust example files (learning_demo.rs, simd_distance_benchmark.rs)
were causing linker errors during pgrx tests because they use pgrx
functions without proper PostgreSQL library context.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:41:16 +00:00
rUv
578b99acf9 fix(ruvllm-esp32): Fix CLI version, bump npm to 0.3.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:59 +00:00
rUv
4f0c691c85 feat(ruvllm-esp32): Bump to v0.3.0 with new modules
Added to crate:
- ota.rs: Over-the-air firmware updates
- benchmark.rs: Performance measurement suite
- diagnostics.rs: Error patterns with fix suggestions
- models/: Pre-quantized model zoo

npm v0.3.0:
- Added web-flasher for browser-based flashing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:58 +00:00
rUv
81b4c2118a feat(ruvllm-esp32): Add comprehensive improvements
Pre-built Binaries:
- GitHub Actions workflow for automated releases
- Builds for all ESP32 variants (esp32, s2, s3, c3, c6)
- Federation-enabled builds for multi-chip setups

Web Flasher:
- Browser-based flashing via ESP Web Serial API
- Zero-install experience
- Target selection with feature display

OTA Updates:
- Over-the-air firmware updates via WiFi
- Version checking and comparison
- Rollback support on failed updates
- Progress callbacks and state management

Model Zoo:
- Pre-quantized models ready to use
- tinystories-1m, microchat-2m, nanoembed-500k, tinyqa-1.5m
- Binary quantized models for minimal memory
- Use case recommendations

Benchmark Suite:
- Automated performance measurement
- Tokens/sec, latency percentiles, memory usage
- Chip-specific estimates
- Report generation

Error Diagnostics:
- 15+ known error patterns with fix suggestions
- Colored terminal output
- Documentation links
- Categories: toolchain, flash, memory, build, network

Offline Mode:
- Toolchain caching for air-gapped environments
- SHA256 verification
- Cross-platform support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:58 +00:00
rUv
dc6c7f7239 chore(ruvllm-esp32): Bump npm version to 0.2.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:58 +00:00
rUv
960712a690 feat(ruvllm-esp32): Add improved Windows PowerShell scripts
- Add setup.ps1: Auto-installs espup, espflash, and ESP32 toolchain
- Add build.ps1: Auto-detects toolchain paths, no hardcoded values
- Add flash.ps1: Auto-detects COM ports with interactive selection
- Add env.ps1: Sets up environment for current session
- Add monitor.ps1: Serial monitor with auto port detection
- Update CLI to use PowerShell scripts on Windows
- Improve COM port detection using System.IO.Ports
- Update README with improved Windows workflow

Fixes Windows-specific issues:
- No more hardcoded paths (C:\Users\ruv\...)
- Dynamic libclang and Python path resolution
- Auto-detection of ESP toolchain location
- Better error handling and user feedback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:58 +00:00
rUv
d316a52d42 fix(ci): Fix formatting and workflow permission issues
- Run cargo fmt across all crates (468 files formatted)
- Add permissions for PR comments in benchmarks.yml
- Add continue-on-error for PR comment steps
- Remove Docker service from postgres-extension-ci (pgrx manages own postgres)
- Add permissions to postgres-extension-ci.yml

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 22:11:57 +00:00
rUv
c785f9d64b docs(ruvllm-esp32): Add npm CLI and esp32-flash references
- Add Option C: npx CLI quickstart section with all commands
- Add npm package link to Crate & Package Links table
- Add esp32-flash flashable project reference
- Update Related section with npm and esp32-flash links

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:49:05 +00:00
rUv
ee7f2e6e8a fix(ruvLLM): Update esp32 README version badge to use crates.io
Replace static version badge with dynamic crates.io badge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:43:56 +00:00
rUv
e747925362 docs(ruvLLM): SEO optimize README and clarify installation options
- Add badges (crates.io, npm, license)
- Improve title with primary keywords
- Add Installation Options section clarifying:
  - npm CLI tool (npx ruvllm-esp32)
  - Rust library (crates.io)
  - Clone project option
- Add SEO keywords section
- Mark esp32-flash Cargo.toml as publish=false
- Enhance npm package.json with 20 keywords
- Copy README to npm directory for package

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:43:27 +00:00
rUv
b38124203f docs(ruvLLM): Comprehensive README with all features documented
- Add value proposition section (why RuvLLM ESP32)
- Document all 10 major features with technical details
- Add supported hardware comparison table (ESP32 variants)
- Add npx quickstart as primary installation method
- Document all serial commands with examples
- Add complete feature guide with code samples
- Include memory/performance benchmarks
- Add project structure documentation
- Document feature flags and library API usage

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:40:00 +00:00
rUv
d6c1cac24e feat(ruvLLM): Complete full-feature ESP32 flash with npx installation
## Changes

### Full Feature Port
- Port all optimizations: binary_quant, product_quant, lookup_tables,
  micro_lora, sparse_attention, pruning
- Port federation module: pipeline, tensor_parallel, speculative, protocol
- Port ruvector module: micro_hnsw, semantic_memory, rag, anomaly

### Cross-Platform Installation
- Add npm package for `npx ruvllm-esp32` commands
- CLI supports: install, build, flash, monitor, config, cluster, info
- Auto-detect serial ports on Windows, Linux, macOS
- Platform-specific toolchain installation

### Build System
- Add GitHub Actions workflow for automated releases
- Build binaries for Linux (x64/ARM64), macOS (x64/ARM64), Windows
- WASM build support for browser/Node.js
- Multi-feature Cargo.toml: esp32, wasm, host-test, federation, full

### Features
- INT8/Binary quantization (32x compression)
- Product quantization (8-32x compression)
- MicroLoRA on-device adaptation
- Sparse attention patterns (sliding window, strided, BigBird)
- HNSW vector search (1000+ vectors in <20KB)
- Semantic memory with context-aware retrieval
- RAG (Retrieval-Augmented Generation)
- Anomaly detection via embedding distance
- Speculative decoding (2-4x speedup potential)
- Multi-chip federation support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 15:37:51 +00:00